diff --git a/hash/gp32.xml b/hash/gp32.xml index 3f72c4f000..3606d0d855 100644 --- a/hash/gp32.xml +++ b/hash/gp32.xml @@ -11,7 +11,7 @@ Questionable? * 강행돌파 [same as herknite?!?] -* Tears - Another Story added (not 100% verified whether it is a final version or not) +* Tears - Another Story added (not 100% verified whether it is a final version or not) It is recommended to use the firmware 1.6.6 as default BIOS! @@ -409,7 +409,7 @@ It is recommended to use the firmware 1.6.6 as default BIOS! - + Pinball Dreams (Eur) 2002 @@ -421,7 +421,7 @@ It is recommended to use the firmware 1.6.6 as default BIOS! - + Story of Bug eyed Monster (Kor) 2003 @@ -444,8 +444,8 @@ It is recommended to use the firmware 1.6.6 as default BIOS! - - + + Super Plusha (Eur) 2002 @@ -456,7 +456,7 @@ It is recommended to use the firmware 1.6.6 as default BIOS! - + Tales of Windy Land (Kor) @@ -468,7 +468,7 @@ It is recommended to use the firmware 1.6.6 as default BIOS! - + Topy Topy Gogo (Eur) @@ -480,8 +480,8 @@ It is recommended to use the firmware 1.6.6 as default BIOS! - - + + Tears - Another Story (Kor) 2003 @@ -493,5 +493,5 @@ It is recommended to use the firmware 1.6.6 as default BIOS! - + diff --git a/hash/pet_hdd.xml b/hash/pet_hdd.xml index 29c04797fc..9759aaaa2e 100644 --- a/hash/pet_hdd.xml +++ b/hash/pet_hdd.xml @@ -27,5 +27,5 @@ - + diff --git a/src/build/makedep.c b/src/build/makedep.c index 046e653f0b..85d024e6db 100644 --- a/src/build/makedep.c +++ b/src/build/makedep.c @@ -138,17 +138,17 @@ int main(int argc, char *argv[]) (*excpathhead)->pathlen = (*excpathhead)->path.len(); excpathhead = &(*excpathhead)->next; } - + else if (arg[0] == '-' && arg[1] == 'F') { argnum++; } - else if (arg[0] == '-' && arg[1] == 'D') - { - // some pkgconfigs return defines (e.g. pkg-config QtGui --cflags) ==> ignore - argnum++; - } + else if (arg[0] == '-' && arg[1] == 'D') + { + // some pkgconfigs return defines (e.g. pkg-config QtGui --cflags) ==> ignore + argnum++; + } // ignore -include which is used by sdlmame to include sdlprefix.h before all other includes else if (strcmp(arg,"-include") == 0) diff --git a/src/emu/bus/a2bus/a2alfam2.c b/src/emu/bus/a2bus/a2alfam2.c index 197d6cdb4d..e55b43f773 100644 --- a/src/emu/bus/a2bus/a2alfam2.c +++ b/src/emu/bus/a2bus/a2alfam2.c @@ -177,7 +177,7 @@ void a2bus_sn76489_device::write_c0nx(address_space &space, UINT8 offset, UINT8 case 3: if (m_has4thsn) { - m_sn4->write(space, 0, data); + m_sn4->write(space, 0, data); m_latch3 = data; } break; diff --git a/src/emu/bus/abcbus/lux21046.c b/src/emu/bus/abcbus/lux21046.c index b0dc187e9d..cbf092fbef 100644 --- a/src/emu/bus/abcbus/lux21046.c +++ b/src/emu/bus/abcbus/lux21046.c @@ -498,7 +498,7 @@ INPUT_PORTS_START( abc830 ) PORT_START("SW3") PORT_DIPNAME( 0x7f, 0x2d, "Card Address" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7") PORT_DIPSETTING( 0x2d, "45" ) - + PORT_START("S1") // also S3,S5 PORT_DIPNAME( 0x01, 0x01, "Interface Type" ) PORT_DIPSETTING( 0x00, "ABC 1600" ) @@ -549,7 +549,7 @@ INPUT_PORTS_START( abc832 ) PORT_START("SW3") PORT_DIPNAME( 0x7f, 0x2c, "Card Address" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7") PORT_DIPSETTING( 0x2c, "44" ) - + PORT_START("S1") // also S3,S5 PORT_DIPNAME( 0x01, 0x01, "Interface Type" ) PORT_DIPSETTING( 0x00, "ABC 1600" ) @@ -629,7 +629,7 @@ INPUT_PORTS_START( abc838 ) PORT_START("SW1") PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:1,2,3,4") PORT_DIPSETTING( 0x00, DEF_STR( Unused ) ) - + PORT_START("SW2") PORT_DIPNAME( 0x0f, 0x0e, "Drive Type" ) PORT_DIPLOCATION("SW2:1,2,3,4") PORT_DIPSETTING( 0x0e, "BASF 6105" ) @@ -688,7 +688,7 @@ INPUT_PORTS_START( abc850 ) PORT_START("SW3") PORT_DIPNAME( 0x7f, 0x2c, "Card Address" ) PORT_DIPLOCATION("SW3:1,2,3,4,5,6,7") PORT_DIPSETTING( 0x2c, "44" ) - + PORT_START("S1") // also S3,S5 PORT_DIPNAME( 0x01, 0x01, "Interface Type" ) PORT_DIPSETTING( 0x00, "ABC 1600" ) @@ -1125,11 +1125,11 @@ WRITE8_MEMBER( luxor_55_21046_device::_8a_w ) if (BIT(data, 2)) { - m_fdc->set_unscaled_clock(XTAL_16MHz/16); + m_fdc->set_unscaled_clock(XTAL_16MHz/16); } else { - m_fdc->set_unscaled_clock(XTAL_16MHz/8); + m_fdc->set_unscaled_clock(XTAL_16MHz/8); } } diff --git a/src/emu/bus/abcbus/lux21056.c b/src/emu/bus/abcbus/lux21056.c index 7dc84668a3..279021a875 100644 --- a/src/emu/bus/abcbus/lux21056.c +++ b/src/emu/bus/abcbus/lux21056.c @@ -30,12 +30,12 @@ $ mess abc800m -bus abc850 -flop1 ufd631 -hard ro202.chd $ mess abc800m -bus abc850 -bus:abc850:io2 xebec,bios=basf6186 -flop1 ufd631 -hard basf6186.chd - - or with the ABC 852 attached: + + or with the ABC 852 attached: $ mess abc800m -bus abc852 -flop1 ufd631 -hard basf6185.chd $ mess abc800m -bus abc852 -bus:abc852:io2 xebec,bios=nec5126 -flop1 ufd631 -hard nec5126.chd - + or with the ABC 856 attached: $ mess abc800m -bus abc856 -flop1 ufd631 -hard micr1325.chd @@ -59,12 +59,12 @@ Enter "DOSGEN,F HD0:" to start the formatting utility. Enter "J", and enter "J" to confirm the formatting. - If you have a 20MB image, format the second partition by entering "DOSGEN,F HD1:", "J", and "J". + If you have a 20MB image, format the second partition by entering "DOSGEN,F HD1:", "J", and "J". - If you have a 60MB image, format the third partition by entering "DOSGEN,F HD2:", "J", and "J", - and format the fourth partition by entering "DOSGEN,F HD3:", "J", and "J". + If you have a 60MB image, format the third partition by entering "DOSGEN,F HD2:", "J", and "J", + and format the fourth partition by entering "DOSGEN,F HD3:", "J", and "J". - You can now list your freshly created partitions by entering "LIB". + You can now list your freshly created partitions by entering "LIB". Or skip all of the above and use the preformatted images in the software list: diff --git a/src/emu/bus/adamnet/fdc.c b/src/emu/bus/adamnet/fdc.c index cb7b778e8a..fe7bd49683 100644 --- a/src/emu/bus/adamnet/fdc.c +++ b/src/emu/bus/adamnet/fdc.c @@ -10,12 +10,12 @@ **********************************************************************/ /* - - TODO: - - 320KB DSDD 5.25" - - 720KB DSDD 3.5" - - 1.44MB DSHD 3.5" + TODO: + + - 320KB DSDD 5.25" + - 720KB DSDD 3.5" + - 1.44MB DSHD 3.5" */ diff --git a/src/emu/bus/c64/pagefox.c b/src/emu/bus/c64/pagefox.c index 2edc58983c..16c46f1274 100644 --- a/src/emu/bus/c64/pagefox.c +++ b/src/emu/bus/c64/pagefox.c @@ -67,7 +67,7 @@ void c64_pagefox_cartridge_device::device_start() { // allocate memory m_ram.allocate(0x8000); - + // state saving save_item(NAME(m_bank)); } diff --git a/src/emu/bus/pc_kbd/iskr1030.c b/src/emu/bus/pc_kbd/iskr1030.c index 021d76088f..96dc8d2abe 100644 --- a/src/emu/bus/pc_kbd/iskr1030.c +++ b/src/emu/bus/pc_kbd/iskr1030.c @@ -66,7 +66,7 @@ static ADDRESS_MAP_START( iskr_1030_keyboard_io, AS_IO, 8, iskr_1030_keyboard_de AM_RANGE(0x00, 0xFF) AM_RAM AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(p1_r, p1_w) AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(p2_w) -// AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(t0_r) +// AM_RANGE(MCS48_PORT_T0, MCS48_PORT_T0) AM_READ(t0_r) AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(t1_r) ADDRESS_MAP_END @@ -358,7 +358,7 @@ WRITE_LINE_MEMBER( iskr_1030_keyboard_device::data_write ) READ8_MEMBER( iskr_1030_keyboard_device::t0_r ) { return 0; -// return clock_signal(); +// return clock_signal(); } diff --git a/src/emu/bus/plus4/std.h b/src/emu/bus/plus4/std.h index 127bf66aa2..99d57227f4 100644 --- a/src/emu/bus/plus4/std.h +++ b/src/emu/bus/plus4/std.h @@ -40,7 +40,7 @@ protected: // device_plus4_expansion_card_interface overrides virtual UINT8 plus4_cd_r(address_space &space, offs_t offset, UINT8 data, int ba, int cs0, int c1l, int c2l, int cs1, int c1h, int c2h); - + }; diff --git a/src/emu/bus/vic10/std.h b/src/emu/bus/vic10/std.h index 2aa7e3574f..ca5fc55f59 100644 --- a/src/emu/bus/vic10/std.h +++ b/src/emu/bus/vic10/std.h @@ -26,7 +26,7 @@ // ======================> vic10_standard_cartridge_device class vic10_standard_cartridge_device : public device_t, - public device_vic10_expansion_card_interface + public device_vic10_expansion_card_interface { public: // construction/destruction diff --git a/src/emu/cpu/8x300/8x300.c b/src/emu/cpu/8x300/8x300.c index 1d031be2d4..dc43204beb 100644 --- a/src/emu/cpu/8x300/8x300.c +++ b/src/emu/cpu/8x300/8x300.c @@ -1,10 +1,10 @@ /* * 8x300.c * - * Implementation of the Scientific Micro Systems SMS300 / Signetics 8X300 CPU + * Implementation of the Scientific Micro Systems SMS300 / Signetics 8X300 CPU * Created on: 18/12/2013 * - * Written by Barry Rodewald + * Written by Barry Rodewald */ #include "debugger.h" @@ -56,7 +56,7 @@ void n8x300_cpu_device::set_reg(UINT8 reg, UINT8 val) case 0x05: m_R5 = val; break; case 0x06: m_R6 = val; break; case 0x07: m_IVL = val; break; -// OVF is read-only +// OVF is read-only case 0x09: m_R11 = val; break; case 0x0f: m_IVR = val; break; default: logerror("8X300: Invalid register %02x written to.\n",reg); break; @@ -74,10 +74,10 @@ UINT8 n8x300_cpu_device::get_reg(UINT8 reg) case 0x04: return m_R4; case 0x05: return m_R5; case 0x06: return m_R6; -// IVL is write-only +// IVL is write-only case 0x08: return m_OVF; case 0x09: return m_R11; -// IVR is write-only +// IVR is write-only default: logerror("8X300: Invalid register %02x read.\n",reg); return 0; } return 0; @@ -142,9 +142,9 @@ void n8x300_cpu_device::state_string_export(const device_state_entry &entry, ast { switch (entry.index()) { -// case STATE_GENFLAGS: -// string.printf("%c%c%c%c%c%c", -// break; +// case STATE_GENFLAGS: +// string.printf("%c%c%c%c%c%c", +// break; } } @@ -550,4 +550,3 @@ offs_t n8x300_cpu_device::disasm_disassemble(char *buffer, offs_t pc, const UINT extern CPU_DISASSEMBLE( n8x300 ); return CPU_DISASSEMBLE_NAME(n8x300)(this, buffer, pc, oprom, opram, options); } - diff --git a/src/emu/cpu/8x300/8x300.h b/src/emu/cpu/8x300/8x300.h index f05ec29955..fa0fbee4c5 100644 --- a/src/emu/cpu/8x300/8x300.h +++ b/src/emu/cpu/8x300/8x300.h @@ -1,7 +1,7 @@ /* * 8x300.h * - * Implementation of the Scientific Micro Systems SMS300 / Signetics 8X300 Microcontroller + * Implementation of the Scientific Micro Systems SMS300 / Signetics 8X300 Microcontroller * Created on: 18/12/2013 */ diff --git a/src/emu/cpu/8x300/8x300dasm.c b/src/emu/cpu/8x300/8x300dasm.c index 707b3ccdb6..40533fccdd 100644 --- a/src/emu/cpu/8x300/8x300dasm.c +++ b/src/emu/cpu/8x300/8x300dasm.c @@ -1,6 +1,6 @@ /* * 8x300dasm.c - * Implementation of the Scientific Micro Systems SMS300 / Signetics 8X300 Microcontroller + * Implementation of the Scientific Micro Systems SMS300 / Signetics 8X300 Microcontroller * * Created on: 18/12/2013 */ diff --git a/src/emu/cpu/cpu.mak b/src/emu/cpu/cpu.mak index d0d955c98c..97bcf617ec 100644 --- a/src/emu/cpu/cpu.mak +++ b/src/emu/cpu/cpu.mak @@ -77,7 +77,7 @@ CPUOBJS += $(CPUOBJ)/8x300/8x300.o DASMOBJS += $(CPUOBJ)/8x300/8x300dasm.o endif -$(CPUOBJ)/8x300/8x300.o: $(CPUSRC)/8x300/8x300.c \ +$(CPUOBJ)/8x300/8x300.o: $(CPUSRC)/8x300/8x300.c \ $(CPUSRC)/8x300/8x300.h #------------------------------------------------- diff --git a/src/emu/cpu/t11/t11.c b/src/emu/cpu/t11/t11.c index ab21aac98b..6c85952480 100644 --- a/src/emu/cpu/t11/t11.c +++ b/src/emu/cpu/t11/t11.c @@ -41,7 +41,7 @@ const device_type T11 = &device_creator; t11_device::t11_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : cpu_device(mconfig, T11, "T11", tag, owner, clock, "t11", __FILE__) , m_program_config("program", ENDIANNESS_LITTLE, 16, 16, 0) - , c_initial_mode(0) + , c_initial_mode(0) { m_is_octal = true; } @@ -379,4 +379,3 @@ offs_t t11_device::disasm_disassemble(char *buffer, offs_t pc, const UINT8 *opro extern CPU_DISASSEMBLE( t11 ); return CPU_DISASSEMBLE_NAME(t11)(this, buffer, pc, oprom, opram, options); } - diff --git a/src/emu/cpu/tms57002/tms57002.c b/src/emu/cpu/tms57002/tms57002.c index a9a7301003..6dee543d11 100644 --- a/src/emu/cpu/tms57002/tms57002.c +++ b/src/emu/cpu/tms57002/tms57002.c @@ -682,7 +682,7 @@ int tms57002_device::decode_get_pc() for(;;) { short ipc; UINT32 opcode = program->read_dword(adr << 2); - + cs.inc = 0; if((opcode & 0xfc0000) == 0xfc0000) @@ -743,11 +743,11 @@ void tms57002_device::execute_run() case 1: ++ca; goto inst; - + case 2: ++id; goto inst; - + case 3: ++ca, ++id; goto inst; diff --git a/src/emu/cpu/z8/z8.c b/src/emu/cpu/z8/z8.c index 8bc4eb116d..7a7602bb63 100644 --- a/src/emu/cpu/z8/z8.c +++ b/src/emu/cpu/z8/z8.c @@ -163,11 +163,11 @@ const device_type Z8611 = &device_creator; ***************************************************************************/ static ADDRESS_MAP_START( program_2kb, AS_PROGRAM, 8, z8_device ) - AM_RANGE(0x0000, 0x07ff) AM_ROM + AM_RANGE(0x0000, 0x07ff) AM_ROM ADDRESS_MAP_END static ADDRESS_MAP_START( program_4kb, AS_PROGRAM, 8, z8_device ) - AM_RANGE(0x0000, 0x0fff) AM_ROM + AM_RANGE(0x0000, 0x0fff) AM_ROM ADDRESS_MAP_END @@ -846,4 +846,3 @@ void z8_device::execute_set_input(int inputnum, int state) } } - diff --git a/src/emu/diimage.c b/src/emu/diimage.c index ff1444d66b..732d64b602 100644 --- a/src/emu/diimage.c +++ b/src/emu/diimage.c @@ -442,7 +442,7 @@ const char *device_image_interface::get_feature(const char *feature_name) bool device_image_interface::load_software_region(const char *tag, optional_shared_ptr &ptr) { size_t size = get_software_region_length(tag); - + if (size) { ptr.allocate(size); diff --git a/src/emu/diserial.h b/src/emu/diserial.h index c31e2d8951..52a9ad0931 100644 --- a/src/emu/diserial.h +++ b/src/emu/diserial.h @@ -37,7 +37,7 @@ public: { CTS = 0x0001, /* Clear to Send. (INPUT) Other end of connection is ready to accept data */ RTS = 0x0002, /* Request to Send. (OUTPUT) This end is ready to send data, and requests if the other */ - /* end is ready to accept it */ + /* end is ready to accept it */ DSR = 0x0004, /* Data Set ready. (INPUT) Other end of connection has data */ DTR = 0x0008, /* Data terminal Ready. (OUTPUT) TX contains new data. */ RX = 0x0010, /* Recieve data. (INPUT) */ @@ -159,7 +159,7 @@ private: class serial_source_device : public device_t, - public device_serial_interface + public device_serial_interface { public: // construction/destruction diff --git a/src/emu/machine/mc2661.c b/src/emu/machine/mc2661.c index 8bca28a21a..8232fc9fbe 100644 --- a/src/emu/machine/mc2661.c +++ b/src/emu/machine/mc2661.c @@ -370,8 +370,8 @@ WRITE8_MEMBER( mc2661_device::write ) UINT32 tx_baud = baud_rates[data & 0x0f]; if(data & 0x10) // internal receiver clock { -// if((m_mr[0] & 0x03) != 0) -// rx_baud *= 16; +// if((m_mr[0] & 0x03) != 0) +// rx_baud *= 16; } else // external receiver clock { @@ -390,8 +390,8 @@ WRITE8_MEMBER( mc2661_device::write ) } if(data & 0x20) // internal transmitter clock { -// if((m_mr[0] & 0x03) != 0) -// tx_baud *= 16; +// if((m_mr[0] & 0x03) != 0) +// tx_baud *= 16; } else // external transmitter clock { diff --git a/src/emu/machine/netlist.c b/src/emu/machine/netlist.c index e88e7b3e7d..0eb037f732 100644 --- a/src/emu/machine/netlist.c +++ b/src/emu/machine/netlist.c @@ -63,7 +63,7 @@ const device_type NETLIST = &device_creator; netlist_mame_device::netlist_mame_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, NETLIST, "netlist", tag, owner, clock, "netlist_mame", __FILE__), device_execute_interface(mconfig, *this), - //device_state_interface(mconfig, *this), + //device_state_interface(mconfig, *this), m_device_start_list(100), m_netlist(NULL), m_setup(NULL), @@ -81,21 +81,21 @@ void netlist_mame_device::static_set_constructor(device_t &device, void (*setup_ void netlist_mame_device::device_config_complete() { - LOG_DEV_CALLS(("device_config_complete\n")); + LOG_DEV_CALLS(("device_config_complete\n")); } void netlist_mame_device::device_start() { - LOG_DEV_CALLS(("device_start\n")); + LOG_DEV_CALLS(("device_start\n")); m_netlist = global_alloc_clear(netlist_mame_t(*this)); m_setup = global_alloc_clear(netlist_setup_t(*m_netlist)); - m_netlist->init_object(*m_netlist, "netlist"); - m_setup->init(); + m_netlist->init_object(*m_netlist, "netlist"); + m_setup->init(); - m_netlist->set_clock_freq(this->clock()); + m_netlist->set_clock_freq(this->clock()); - // register additional devices + // register additional devices m_setup->factory().register_device( "NETDEV_CALLBACK", "nld_analog_callback"); @@ -104,12 +104,12 @@ void netlist_mame_device::device_start() m_setup->start_devices(); m_setup->resolve_inputs(); - bool allok = true; - for (device_start_list_t::entry_t *ods = m_device_start_list.first(); ods != NULL; ods = m_device_start_list.next(ods)) - allok &= ods->object()->OnDeviceStart(); + bool allok = true; + for (device_start_list_t::entry_t *ods = m_device_start_list.first(); ods != NULL; ods = m_device_start_list.next(ods)) + allok &= ods->object()->OnDeviceStart(); - if (!allok) - m_netlist->xfatalerror("required elements not found\n"); + if (!allok) + m_netlist->xfatalerror("required elements not found\n"); save_state(); @@ -119,13 +119,13 @@ void netlist_mame_device::device_start() void netlist_mame_device::device_reset() { - LOG_DEV_CALLS(("device_reset\n")); + LOG_DEV_CALLS(("device_reset\n")); m_netlist->reset(); } void netlist_mame_device::device_stop() { - LOG_DEV_CALLS(("device_stop\n")); + LOG_DEV_CALLS(("device_stop\n")); m_setup->print_stats(); global_free(m_setup); @@ -136,38 +136,38 @@ void netlist_mame_device::device_stop() ATTR_COLD void netlist_mame_device::device_post_load() { - LOG_DEV_CALLS(("device_post_load\n")); - m_netlist->queue().clear(); - NL_VERBOSE_OUT(("current time %f qsize %d\n", m_netlist->time().as_double(), qsize)); - for (int i = 0; i < qsize; i++ ) - { - netlist_net_t *n = m_netlist->find_net(qtemp[i].m_name); - NL_VERBOSE_OUT(("Got %s ==> %p\n", qtemp[i].m_name, n)); - NL_VERBOSE_OUT(("schedule time %f (%f)\n", n->time().as_double(), qtemp[i].m_time.as_double())); - m_netlist->queue().push(netlist_base_t::queue_t::entry_t(qtemp[i].m_time, *n)); - } + LOG_DEV_CALLS(("device_post_load\n")); + m_netlist->queue().clear(); + NL_VERBOSE_OUT(("current time %f qsize %d\n", m_netlist->time().as_double(), qsize)); + for (int i = 0; i < qsize; i++ ) + { + netlist_net_t *n = m_netlist->find_net(qtemp[i].m_name); + NL_VERBOSE_OUT(("Got %s ==> %p\n", qtemp[i].m_name, n)); + NL_VERBOSE_OUT(("schedule time %f (%f)\n", n->time().as_double(), qtemp[i].m_time.as_double())); + m_netlist->queue().push(netlist_base_t::queue_t::entry_t(qtemp[i].m_time, *n)); + } } ATTR_COLD void netlist_mame_device::device_pre_save() { - LOG_DEV_CALLS(("device_pre_save\n")); + LOG_DEV_CALLS(("device_pre_save\n")); - qsize = m_netlist->queue().count(); - NL_VERBOSE_OUT(("current time %f qsize %d\n", m_netlist->time().as_double(), qsize)); - for (int i = 0; i < qsize; i++ ) - { - qtemp[i].m_time = m_netlist->queue().listptr()[i].time(); - const char *p = m_netlist->queue().listptr()[i].object().name().cstr(); - int n = MIN(63, strlen(p)); - strncpy(qtemp[i].m_name, p, n); - qtemp[i].m_name[n] = 0; - } + qsize = m_netlist->queue().count(); + NL_VERBOSE_OUT(("current time %f qsize %d\n", m_netlist->time().as_double(), qsize)); + for (int i = 0; i < qsize; i++ ) + { + qtemp[i].m_time = m_netlist->queue().listptr()[i].time(); + const char *p = m_netlist->queue().listptr()[i].object().name().cstr(); + int n = MIN(63, strlen(p)); + strncpy(qtemp[i].m_name, p, n); + qtemp[i].m_name[n] = 0; + } #if 0 - netlist_time *nlt = (netlist_time *) ; - netlist_base_t::queue_t::entry_t *p = m_netlist->queue().listptr()[i]; - netlist_time *nlt = (netlist_time *) p->time_ptr(); - save_pointer(nlt->get_internaltype_ptr(), "queue", 1, i); + netlist_time *nlt = (netlist_time *) ; + netlist_base_t::queue_t::entry_t *p = m_netlist->queue().listptr()[i]; + netlist_time *nlt = (netlist_time *) p->time_ptr(); + save_pointer(nlt->get_internaltype_ptr(), "queue", 1, i); #endif } @@ -179,43 +179,43 @@ void netlist_mame_device::device_timer(emu_timer &timer, device_timer_id id, int ATTR_COLD void netlist_mame_device::save_state() { - for (pstate_entry_t::list_t::entry_t *p = m_netlist->save_list().first(); p != NULL; p = m_netlist->save_list().next(p)) - { - pstate_entry_t *s = p->object(); - NL_VERBOSE_OUT(("saving state for %s\n", s->m_name.cstr())); - switch (s->m_dt) - { - case DT_DOUBLE: - save_pointer((double *) s->m_ptr, s->m_name, s->m_count); - break; - case DT_INT64: - save_pointer((INT64 *) s->m_ptr, s->m_name, s->m_count); - break; - case DT_INT8: - save_pointer((INT8 *) s->m_ptr, s->m_name, s->m_count); - break; - case DT_INT: - save_pointer((int *) s->m_ptr, s->m_name, s->m_count); - break; - case DT_BOOLEAN: - save_pointer((bool *) s->m_ptr, s->m_name, s->m_count); - break; - case NOT_SUPPORTED: - default: - m_netlist->xfatalerror("found unsupported save element %s\n", s->m_name.cstr()); - break; - } - } + for (pstate_entry_t::list_t::entry_t *p = m_netlist->save_list().first(); p != NULL; p = m_netlist->save_list().next(p)) + { + pstate_entry_t *s = p->object(); + NL_VERBOSE_OUT(("saving state for %s\n", s->m_name.cstr())); + switch (s->m_dt) + { + case DT_DOUBLE: + save_pointer((double *) s->m_ptr, s->m_name, s->m_count); + break; + case DT_INT64: + save_pointer((INT64 *) s->m_ptr, s->m_name, s->m_count); + break; + case DT_INT8: + save_pointer((INT8 *) s->m_ptr, s->m_name, s->m_count); + break; + case DT_INT: + save_pointer((int *) s->m_ptr, s->m_name, s->m_count); + break; + case DT_BOOLEAN: + save_pointer((bool *) s->m_ptr, s->m_name, s->m_count); + break; + case NOT_SUPPORTED: + default: + m_netlist->xfatalerror("found unsupported save element %s\n", s->m_name.cstr()); + break; + } + } - // handle the queue + // handle the queue - save_item(NAME(qsize)); - for (int i = 0; i < m_netlist->queue().capacity(); i++ ) - { - save_pointer(qtemp[i].m_time.get_internaltype_ptr(), "queue_time", 1, i); - save_pointer(qtemp[i].m_name, "queue_name", sizeof(qtemp[i].m_name), i); + save_item(NAME(qsize)); + for (int i = 0; i < m_netlist->queue().capacity(); i++ ) + { + save_pointer(qtemp[i].m_time.get_internaltype_ptr(), "queue_time", 1, i); + save_pointer(qtemp[i].m_name, "queue_name", sizeof(qtemp[i].m_name), i); - } + } } ATTR_COLD UINT64 netlist_mame_device::execute_clocks_to_cycles(UINT64 clocks) const @@ -235,7 +235,7 @@ ATTR_HOT void netlist_mame_device::execute_run() // debugging //m_ppc = m_pc; // copy PC to previous PC if (check_debugger) - debugger_instruction_hook(this, 0); //m_pc); + debugger_instruction_hook(this, 0); //m_pc); m_netlist->process_queue(m_icount); } diff --git a/src/emu/machine/netlist.h b/src/emu/machine/netlist.h index 1ad5588bb0..7ac6cb53b9 100644 --- a/src/emu/machine/netlist.h +++ b/src/emu/machine/netlist.h @@ -70,18 +70,18 @@ // ---------------------------------------------------------------------------------------- #define NETLIST_MEMREGION(_name) \ - netlist.parse((char *)downcast(netlist.netlist()).machine().root_device().memregion(_name)->base()); + netlist.parse((char *)downcast(netlist.netlist()).machine().root_device().memregion(_name)->base()); #define NETDEV_ANALOG_CALLBACK(_name, _IN, _class, _member, _tag) \ - { \ - NETLIB_NAME(analog_callback) *dev = downcast(netlist.register_dev(NET_NEW(analog_callback), # _name)); \ - netlist_analog_output_delegate d = netlist_analog_output_delegate(& _class :: _member, # _class "::" # _member, _tag, (_class *) 0); \ - dev->register_callback(d); \ - } \ - NET_CONNECT(_name, IN, _IN) + { \ + NETLIB_NAME(analog_callback) *dev = downcast(netlist.register_dev(NET_NEW(analog_callback), # _name)); \ + netlist_analog_output_delegate d = netlist_analog_output_delegate(& _class :: _member, # _class "::" # _member, _tag, (_class *) 0); \ + dev->register_callback(d); \ + } \ + NET_CONNECT(_name, IN, _IN) #define NETDEV_ANALOG_CALLBACK_MEMBER(_name) \ - void _name(const double data, const attotime &time) + void _name(const double data, const attotime &time) class netlist_mame_device; @@ -89,26 +89,26 @@ class netlist_mame_t : public netlist_base_t { public: - netlist_mame_t(netlist_mame_device &parent) - : netlist_base_t(), - m_parent(parent) - {} - virtual ~netlist_mame_t() { }; + netlist_mame_t(netlist_mame_device &parent) + : netlist_base_t(), + m_parent(parent) + {} + virtual ~netlist_mame_t() { }; - inline running_machine &machine(); + inline running_machine &machine(); - netlist_mame_device &parent() { return m_parent; } + netlist_mame_device &parent() { return m_parent; } protected: - void vfatalerror(const char *format, va_list ap) const - { - emu_fatalerror error(format, ap); - throw error; - } + void vfatalerror(const char *format, va_list ap) const + { + emu_fatalerror error(format, ap); + throw error; + } private: - netlist_mame_device &m_parent; + netlist_mame_device &m_parent; }; // ---------------------------------------------------------------------------------------- @@ -121,21 +121,21 @@ private: // ======================> netlist_mame_device class netlist_mame_device : public device_t, - public device_execute_interface - //public device_state_interface - //, public device_memory_interface + public device_execute_interface + //public device_state_interface + //, public device_memory_interface { public: template class output_finder; - template + template class optional_output; template class required_output; - template + template class optional_param; - template + template class required_param; class on_device_start; @@ -159,7 +159,7 @@ protected: virtual void device_stop(); virtual void device_reset(); virtual void device_post_load(); - virtual void device_pre_save(); + virtual void device_pre_save(); virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); virtual UINT64 execute_clocks_to_cycles(UINT64 clocks) const; virtual UINT64 execute_cycles_to_clocks(UINT64 cycles) const; @@ -173,8 +173,8 @@ protected: // more save state ... needs to go somewhere else struct qentry { - netlist_time m_time; - char m_name[64]; + netlist_time m_time; + char m_name[64]; }; qentry qtemp[1024]; @@ -193,7 +193,7 @@ private: inline running_machine &netlist_mame_t::machine() { - return m_parent.machine(); + return m_parent.machine(); } // ---------------------------------------------------------------------------------------- @@ -205,75 +205,75 @@ typedef device_delegate netlist_analog_ou class NETLIB_NAME(analog_callback) : public netlist_device_t { public: - NETLIB_NAME(analog_callback)() - : netlist_device_t() { } + NETLIB_NAME(analog_callback)() + : netlist_device_t() { } - ATTR_COLD void start() - { - register_input("IN", m_in); - m_callback.bind_relative_to(downcast(netlist()).machine().root_device()); - } + ATTR_COLD void start() + { + register_input("IN", m_in); + m_callback.bind_relative_to(downcast(netlist()).machine().root_device()); + } - ATTR_COLD void register_callback(netlist_analog_output_delegate callback) - { - m_callback = callback; - } + ATTR_COLD void register_callback(netlist_analog_output_delegate callback) + { + m_callback = callback; + } - ATTR_HOT void update() - { - // FIXME: Remove after device cleanup - if (!m_callback.isnull()) - m_callback(INPANALOG(m_in), downcast(netlist()).parent().local_time()); - } + ATTR_HOT void update() + { + // FIXME: Remove after device cleanup + if (!m_callback.isnull()) + m_callback(INPANALOG(m_in), downcast(netlist()).parent().local_time()); + } private: - netlist_analog_input_t m_in; - netlist_analog_output_delegate m_callback; + netlist_analog_input_t m_in; + netlist_analog_output_delegate m_callback; }; class NETLIB_NAME(sound) : public netlist_device_t { public: - NETLIB_NAME(sound)() - : netlist_device_t() { } + NETLIB_NAME(sound)() + : netlist_device_t() { } - static const int BUFSIZE = 2048; + static const int BUFSIZE = 2048; - ATTR_COLD void start() - { - register_input("IN", m_in); - m_cur = 0; - m_last_pos = 0; - m_last_buffer = netlist_time::zero; - m_sample = netlist_time::zero; // FIXME: divide by zero - } + ATTR_COLD void start() + { + register_input("IN", m_in); + m_cur = 0; + m_last_pos = 0; + m_last_buffer = netlist_time::zero; + m_sample = netlist_time::zero; // FIXME: divide by zero + } - ATTR_HOT void sound_update() - { - netlist_time current = netlist().time(); - int pos = (current - m_last_buffer) / m_sample; - if (pos >= BUFSIZE) - netlist().xfatalerror("sound %s: exceeded BUFSIZE\n", name().cstr()); - while (m_last_pos < pos ) - { - m_buffer[m_last_pos++] = m_cur; - } - } + ATTR_HOT void sound_update() + { + netlist_time current = netlist().time(); + int pos = (current - m_last_buffer) / m_sample; + if (pos >= BUFSIZE) + netlist().xfatalerror("sound %s: exceeded BUFSIZE\n", name().cstr()); + while (m_last_pos < pos ) + { + m_buffer[m_last_pos++] = m_cur; + } + } - ATTR_HOT void update() - { - double val = INPANALOG(m_in); - sound_update(); - m_cur = val; - } + ATTR_HOT void update() + { + double val = INPANALOG(m_in); + sound_update(); + m_cur = val; + } private: - netlist_analog_input_t m_in; - netlist_time m_sample; - double m_cur; - int m_last_pos; - netlist_time m_last_buffer; - stream_sample_t m_buffer[BUFSIZE]; + netlist_analog_input_t m_in; + netlist_time m_sample; + double m_cur; + int m_last_pos; + netlist_time m_last_buffer; + stream_sample_t m_buffer[BUFSIZE]; }; diff --git a/src/emu/machine/nscsi_cb.c b/src/emu/machine/nscsi_cb.c index 35d7e873d5..bd828cac1e 100644 --- a/src/emu/machine/nscsi_cb.c +++ b/src/emu/machine/nscsi_cb.c @@ -4,15 +4,15 @@ const device_type NSCSI_CB = &device_creator; nscsi_callback_device::nscsi_callback_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : nscsi_device(mconfig, NSCSI_CB, "SCSI callback (new)", tag, owner, clock, "nscsi_cb", __FILE__), - m_write_rst(*this), - m_write_atn(*this), - m_write_ack(*this), - m_write_req(*this), - m_write_msg(*this), - m_write_io(*this), - m_write_cd(*this), - m_write_sel(*this), - m_write_bsy(*this) + m_write_rst(*this), + m_write_atn(*this), + m_write_ack(*this), + m_write_req(*this), + m_write_msg(*this), + m_write_io(*this), + m_write_cd(*this), + m_write_sel(*this), + m_write_bsy(*this) { } diff --git a/src/emu/machine/nscsi_s1410.c b/src/emu/machine/nscsi_s1410.c index e38fc7135e..d3f3defd95 100644 --- a/src/emu/machine/nscsi_s1410.c +++ b/src/emu/machine/nscsi_s1410.c @@ -10,7 +10,7 @@ nscsi_s1410_device::nscsi_s1410_device(const machine_config &mconfig, const char void nscsi_s1410_device::device_reset() { nscsi_harddisk_device::device_reset(); - + // initialize drive characteristics params[0] = 0; params[1] = 153; @@ -44,7 +44,7 @@ void nscsi_s1410_device::scsi_command() scsi_status_complete(SS_NOT_READY); return; } - + scsi_status_complete(SS_GOOD); break; @@ -56,7 +56,7 @@ void nscsi_s1410_device::scsi_command() lba = ((scsi_cmdbuf[1] & 0x1f)<<16) | (scsi_cmdbuf[2]<<8) | scsi_cmdbuf[3]; blocks = (bytes_per_sector == 256) ? 32 : 17; - + int track_length = blocks*bytes_per_sector; UINT8 *data = global_alloc_array(UINT8,track_length); memset(data, 0xc6, track_length); @@ -76,7 +76,7 @@ void nscsi_s1410_device::scsi_command() scsi_status_complete(SS_NOT_READY); return; } - + scsi_data_in(2, 3); scsi_status_complete(SS_GOOD); break; @@ -103,7 +103,7 @@ void nscsi_s1410_device::scsi_command() } scsi_status_complete(SS_GOOD); break; - + case SC_READ_ECC_BURST: case SC_RAM_DIAG: case SC_DRIVE_DIAG: @@ -135,7 +135,7 @@ void nscsi_s1410_device::scsi_put_data(int id, int pos, UINT8 data) switch(scsi_cmdbuf[0]) { case SC_FORMAT_ALT_TRACK: break; - + case SC_INIT_DRIVE_PARAMS: params[pos] = data; break; diff --git a/src/emu/machine/nscsi_s1410.h b/src/emu/machine/nscsi_s1410.h index 7409b6c6f0..0af6963950 100644 --- a/src/emu/machine/nscsi_s1410.h +++ b/src/emu/machine/nscsi_s1410.h @@ -12,42 +12,42 @@ public: protected: // SCSI status returns enum { - SS_GOOD = 0x00, - SS_NO_INDEX = 0x01, - SS_NO_SEEK_COMPLETE = 0x02, - SS_WRITE_FAULT = 0x03, - SS_NOT_READY = 0x04, - SS_TK00_NOT_FOUND = 0x06, - SS_SEEK_IN_PROGRESS = 0x08, - SS_ID_FIELD_ERROR = 0x10, - SS_DATA_ERROR = 0x11, - SS_SAM_NOT_FOUND = 0x12, - SS_SECTOR_NOT_FOUND = 0x14, - SS_SEEK_ERROR = 0x15, - SS_ECC = 0x18, - SS_BAD_TRACK = 0x19, - SS_FORMAT_ERROR = 0x1a, - SS_ALT_TRACK = 0x1c, - SS_ALT_TRACK_DEFECT = 0x1d, + SS_GOOD = 0x00, + SS_NO_INDEX = 0x01, + SS_NO_SEEK_COMPLETE = 0x02, + SS_WRITE_FAULT = 0x03, + SS_NOT_READY = 0x04, + SS_TK00_NOT_FOUND = 0x06, + SS_SEEK_IN_PROGRESS = 0x08, + SS_ID_FIELD_ERROR = 0x10, + SS_DATA_ERROR = 0x11, + SS_SAM_NOT_FOUND = 0x12, + SS_SECTOR_NOT_FOUND = 0x14, + SS_SEEK_ERROR = 0x15, + SS_ECC = 0x18, + SS_BAD_TRACK = 0x19, + SS_FORMAT_ERROR = 0x1a, + SS_ALT_TRACK = 0x1c, + SS_ALT_TRACK_DEFECT = 0x1d, SS_ALT_TRACK_NOT_FOUND = 0x1e, SS_ALT_TRACK_SAME = 0x1f, - SS_RAM_ERROR = 0x30, - SS_ROM_ERROR = 0x31, - SS_ECC_CHECK_FAILURE = 0x32 + SS_RAM_ERROR = 0x30, + SS_ROM_ERROR = 0x31, + SS_ECC_CHECK_FAILURE = 0x32 }; // SCSI commands enum { - SC_TEST_UNIT_READY = 0x00, - SC_REZERO = 0x01, - SC_REQUEST_SENSE = 0x03, - SC_FORMAT_UNIT = 0x04, - SC_CHECK_TRACK_FORMAT = 0x05, - SC_FORMAT_TRACK = 0x06, - SC_REASSIGN_BLOCKS = 0x07, - SC_READ = 0x08, - SC_WRITE = 0x0a, - SC_SEEK = 0x0b, + SC_TEST_UNIT_READY = 0x00, + SC_REZERO = 0x01, + SC_REQUEST_SENSE = 0x03, + SC_FORMAT_UNIT = 0x04, + SC_CHECK_TRACK_FORMAT = 0x05, + SC_FORMAT_TRACK = 0x06, + SC_REASSIGN_BLOCKS = 0x07, + SC_READ = 0x08, + SC_WRITE = 0x0a, + SC_SEEK = 0x0b, SC_INIT_DRIVE_PARAMS = 0x0c, SC_READ_ECC_BURST = 0x0d, SC_FORMAT_ALT_TRACK = 0x0e, diff --git a/src/emu/machine/t10mmc.c b/src/emu/machine/t10mmc.c index 84ff5f7266..aee65ffb5c 100644 --- a/src/emu/machine/t10mmc.c +++ b/src/emu/machine/t10mmc.c @@ -550,10 +550,10 @@ void t10mmc::ReadData( UINT8 *data, int dataLength ) case T10MMC_CMD_READ_TOC_PMA_ATIP: /* - Track numbers are problematic here: 0 = lead-in, 0xaa = lead-out. - That makes sense in terms of how real-world CDs are referred to, but - our internal routines for tracks use "0" as track 1. That probably - should be fixed... + Track numbers are problematic here: 0 = lead-in, 0xaa = lead-out. + That makes sense in terms of how real-world CDs are referred to, but + our internal routines for tracks use "0" as track 1. That probably + should be fixed... */ { bool msf = (command[1] & 0x2) != 0; diff --git a/src/emu/machine/t10sbc.c b/src/emu/machine/t10sbc.c index 59e421ca16..204046e39d 100644 --- a/src/emu/machine/t10sbc.c +++ b/src/emu/machine/t10sbc.c @@ -42,9 +42,9 @@ void t10sbc::ExecCommand() case T10SBC_CMD_SEEK_6: m_lba = (command[1]&0x1f)<<16 | command[2]<<8 | command[3]; - + logerror("S1410: SEEK to LBA %x\n", m_lba); - + m_phase = SCSI_PHASE_STATUS; m_transfer_length = 0; break; diff --git a/src/emu/machine/tmp68301.c b/src/emu/machine/tmp68301.c index 1065c8b01b..134578c267 100644 --- a/src/emu/machine/tmp68301.c +++ b/src/emu/machine/tmp68301.c @@ -6,11 +6,11 @@ 3 timers, address decoder, wait generator, interrupt controller, all integrated in a single chip. - TODO: - - Interrupt generation: handle pending / in-service mechanisms - - Parallel port: handle timing latency - - Serial port: not done at all - - (and many other things) + TODO: + - Interrupt generation: handle pending / in-service mechanisms + - Parallel port: handle timing latency + - Serial port: not done at all + - (and many other things) ***************************************************************************/ @@ -20,7 +20,7 @@ const device_type TMP68301 = &device_creator; static ADDRESS_MAP_START( tmp68301_regs, AS_0, 16, tmp68301_device ) -// AM_RANGE(0x000,0x3ff) AM_RAM +// AM_RANGE(0x000,0x3ff) AM_RAM AM_RANGE(0x094,0x095) AM_READWRITE(imr_r,imr_w) AM_RANGE(0x098,0x099) AM_READWRITE(iisr_r,iisr_w) @@ -63,9 +63,9 @@ READ16_MEMBER(tmp68301_device::scr_r) WRITE16_MEMBER(tmp68301_device::scr_w) { /* - *--- ---- CKSE - --*- ---- RES - ---- ---* INTM + *--- ---- CKSE + --*- ---- RES + ---- ---* INTM */ COMBINE_DATA(&m_scr); diff --git a/src/emu/machine/tmp68301.h b/src/emu/machine/tmp68301.h index 5ed7aab2d0..31811342f4 100644 --- a/src/emu/machine/tmp68301.h +++ b/src/emu/machine/tmp68301.h @@ -29,7 +29,7 @@ struct tmp68301_interface { devcb_read16 m_in_parallel_cb; devcb_write16 m_out_parallel_cb; -// TODO: serial ports +// TODO: serial ports }; class tmp68301_device : public device_t, diff --git a/src/emu/machine/upd4992.c b/src/emu/machine/upd4992.c index 95a2db0e01..7a56bb678a 100644 --- a/src/emu/machine/upd4992.c +++ b/src/emu/machine/upd4992.c @@ -2,13 +2,13 @@ // copyright-holders: Angelo Salese /*************************************************************************** - uPD4992 parallel RTC + uPD4992 parallel RTC - TODO: - - Add timers - - Add leap year count - - Add 12 hours mode - - Add mode/control register + TODO: + - Add timers + - Add leap year count + - Add 12 hours mode + - Add mode/control register ***************************************************************************/ @@ -35,7 +35,7 @@ const device_type UPD4992 = &device_creator; upd4992_device::upd4992_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, UPD4992, "uPD4992", tag, owner, clock, "upd4992", __FILE__), - device_rtc_interface(mconfig, *this) + device_rtc_interface(mconfig, *this) { } diff --git a/src/emu/machine/upd4992.h b/src/emu/machine/upd4992.h index b94f0fee76..17feb7a942 100644 --- a/src/emu/machine/upd4992.h +++ b/src/emu/machine/upd4992.h @@ -2,7 +2,7 @@ // copyright-holders: Angelo Salese /*************************************************************************** - uPD4992 RTC + uPD4992 RTC ***************************************************************************/ @@ -27,7 +27,7 @@ // ======================> upd4992_device class upd4992_device : public device_t, - public device_rtc_interface + public device_rtc_interface { public: // construction/destruction diff --git a/src/emu/machine/z80dart.c b/src/emu/machine/z80dart.c index f770e6b7c3..1e7da115a5 100644 --- a/src/emu/machine/z80dart.c +++ b/src/emu/machine/z80dart.c @@ -1227,7 +1227,7 @@ WRITE_LINE_MEMBER( z80dart_channel::rxc_w ) m_rx_clock++; if (m_rx_clock == clocks) m_rx_clock = 0; - + } } @@ -1249,7 +1249,7 @@ WRITE_LINE_MEMBER( z80dart_channel::txc_w ) m_tx_clock++; if (m_tx_clock == clocks) m_tx_clock = 0; - + } } @@ -1339,4 +1339,3 @@ WRITE_LINE_MEMBER(z80dart_channel::write_rx) input_callback(m_input_state & ~RX); } } - diff --git a/src/emu/machine/z80dma.c b/src/emu/machine/z80dma.c index df0803ad19..846ea1ce79 100644 --- a/src/emu/machine/z80dma.c +++ b/src/emu/machine/z80dma.c @@ -123,7 +123,7 @@ const int TM_SEARCH_TRANSFER = 0x03; #define EOB_F_CLEAR (m_status |= 0x20) #define READY_ACTIVE_HIGH ((WR5>>3) & 0x01) -#define AUTO_RESTART ((WR5>>5) & 0x01) +#define AUTO_RESTART ((WR5>>5) & 0x01) #define INTERRUPT_ENABLE (WR3 & 0x20) #define INT_ON_MATCH (INTERRUPT_CTRL & 0x01) diff --git a/src/emu/netlist/devices/net_lib.c b/src/emu/netlist/devices/net_lib.c index 81a375bfd2..fdb376d634 100644 --- a/src/emu/netlist/devices/net_lib.c +++ b/src/emu/netlist/devices/net_lib.c @@ -53,164 +53,164 @@ NETLIB_START(nic7448) { - register_sub(sub, "sub"); + register_sub(sub, "sub"); - register_subalias("A0", sub.m_A0); - register_subalias("A1", sub.m_A1); - register_subalias("A2", sub.m_A2); - register_subalias("A3", sub.m_A3); - register_input("LTQ", m_LTQ); - register_input("BIQ", m_BIQ); - register_subalias("RBIQ",sub.m_RBIQ); + register_subalias("A0", sub.m_A0); + register_subalias("A1", sub.m_A1); + register_subalias("A2", sub.m_A2); + register_subalias("A3", sub.m_A3); + register_input("LTQ", m_LTQ); + register_input("BIQ", m_BIQ); + register_subalias("RBIQ",sub.m_RBIQ); - register_subalias("a", sub.m_a); - register_subalias("b", sub.m_b); - register_subalias("c", sub.m_c); - register_subalias("d", sub.m_d); - register_subalias("e", sub.m_e); - register_subalias("f", sub.m_f); - register_subalias("g", sub.m_g); + register_subalias("a", sub.m_a); + register_subalias("b", sub.m_b); + register_subalias("c", sub.m_c); + register_subalias("d", sub.m_d); + register_subalias("e", sub.m_e); + register_subalias("f", sub.m_f); + register_subalias("g", sub.m_g); } NETLIB_UPDATE(nic7448) { - if (INPLOGIC(m_BIQ) && !INPLOGIC(m_LTQ)) - { - sub.update_outputs(8); - } - else if (!INPLOGIC(m_BIQ)) - { - sub.update_outputs(15); - } + if (INPLOGIC(m_BIQ) && !INPLOGIC(m_LTQ)) + { + sub.update_outputs(8); + } + else if (!INPLOGIC(m_BIQ)) + { + sub.update_outputs(15); + } - if (!INPLOGIC(m_BIQ) || (INPLOGIC(m_BIQ) && !INPLOGIC(m_LTQ))) - { - sub.m_A0.inactivate(); - sub.m_A1.inactivate(); - sub.m_A2.inactivate(); - sub.m_A3.inactivate(); - sub.m_RBIQ.inactivate(); - } else { - sub.m_RBIQ.activate(); - sub.m_A3.activate(); - sub.m_A2.activate(); - sub.m_A1.activate(); - sub.m_A0.activate(); - sub.update(); - } + if (!INPLOGIC(m_BIQ) || (INPLOGIC(m_BIQ) && !INPLOGIC(m_LTQ))) + { + sub.m_A0.inactivate(); + sub.m_A1.inactivate(); + sub.m_A2.inactivate(); + sub.m_A3.inactivate(); + sub.m_RBIQ.inactivate(); + } else { + sub.m_RBIQ.activate(); + sub.m_A3.activate(); + sub.m_A2.activate(); + sub.m_A1.activate(); + sub.m_A0.activate(); + sub.update(); + } } NETLIB_START(nic7448_sub) { - m_state = 0; + m_state = 0; - register_input("A0", m_A0); - register_input("A1", m_A1); - register_input("A2", m_A2); - register_input("A3", m_A3); - register_input("RBIQ", m_RBIQ); + register_input("A0", m_A0); + register_input("A1", m_A1); + register_input("A2", m_A2); + register_input("A3", m_A3); + register_input("RBIQ", m_RBIQ); - register_output("a", m_a); - register_output("b", m_b); - register_output("c", m_c); - register_output("d", m_d); - register_output("e", m_e); - register_output("f", m_f); - register_output("g", m_g); + register_output("a", m_a); + register_output("b", m_b); + register_output("c", m_c); + register_output("d", m_d); + register_output("e", m_e); + register_output("f", m_f); + register_output("g", m_g); - save(NAME(m_state)); + save(NAME(m_state)); } NETLIB_UPDATE(nic7448_sub) { - UINT8 v; + UINT8 v; - v = (INPLOGIC(m_A0) << 0) | (INPLOGIC(m_A1) << 1) | (INPLOGIC(m_A2) << 2) | (INPLOGIC(m_A3) << 3); - if ((!INPLOGIC(m_RBIQ) && (v==0))) - v = 15; - update_outputs(v); + v = (INPLOGIC(m_A0) << 0) | (INPLOGIC(m_A1) << 1) | (INPLOGIC(m_A2) << 2) | (INPLOGIC(m_A3) << 3); + if ((!INPLOGIC(m_RBIQ) && (v==0))) + v = 15; + update_outputs(v); } NETLIB_FUNC_VOID(nic7448_sub, update_outputs, (UINT8 v)) { - assert(v<16); - if (v != m_state) - { - OUTLOGIC(m_a, tab7448[v][0], NLTIME_FROM_NS(100)); - OUTLOGIC(m_b, tab7448[v][1], NLTIME_FROM_NS(100)); - OUTLOGIC(m_c, tab7448[v][2], NLTIME_FROM_NS(100)); - OUTLOGIC(m_d, tab7448[v][3], NLTIME_FROM_NS(100)); - OUTLOGIC(m_e, tab7448[v][4], NLTIME_FROM_NS(100)); - OUTLOGIC(m_f, tab7448[v][5], NLTIME_FROM_NS(100)); - OUTLOGIC(m_g, tab7448[v][6], NLTIME_FROM_NS(100)); - m_state = v; - } + assert(v<16); + if (v != m_state) + { + OUTLOGIC(m_a, tab7448[v][0], NLTIME_FROM_NS(100)); + OUTLOGIC(m_b, tab7448[v][1], NLTIME_FROM_NS(100)); + OUTLOGIC(m_c, tab7448[v][2], NLTIME_FROM_NS(100)); + OUTLOGIC(m_d, tab7448[v][3], NLTIME_FROM_NS(100)); + OUTLOGIC(m_e, tab7448[v][4], NLTIME_FROM_NS(100)); + OUTLOGIC(m_f, tab7448[v][5], NLTIME_FROM_NS(100)); + OUTLOGIC(m_g, tab7448[v][6], NLTIME_FROM_NS(100)); + m_state = v; + } } const UINT8 NETLIB_NAME(nic7448_sub)::tab7448[16][7] = { - { 1, 1, 1, 1, 1, 1, 0 }, /* 00 - not blanked ! */ - { 0, 1, 1, 0, 0, 0, 0 }, /* 01 */ - { 1, 1, 0, 1, 1, 0, 1 }, /* 02 */ - { 1, 1, 1, 1, 0, 0, 1 }, /* 03 */ - { 0, 1, 1, 0, 0, 1, 1 }, /* 04 */ - { 1, 0, 1, 1, 0, 1, 1 }, /* 05 */ - { 0, 0, 1, 1, 1, 1, 1 }, /* 06 */ - { 1, 1, 1, 0, 0, 0, 0 }, /* 07 */ - { 1, 1, 1, 1, 1, 1, 1 }, /* 08 */ - { 1, 1, 1, 0, 0, 1, 1 }, /* 09 */ - { 0, 0, 0, 1, 1, 0, 1 }, /* 10 */ - { 0, 0, 1, 1, 0, 0, 1 }, /* 11 */ - { 0, 1, 0, 0, 0, 1, 1 }, /* 12 */ - { 1, 0, 0, 1, 0, 1, 1 }, /* 13 */ - { 0, 0, 0, 1, 1, 1, 1 }, /* 14 */ - { 0, 0, 0, 0, 0, 0, 0 }, /* 15 */ + { 1, 1, 1, 1, 1, 1, 0 }, /* 00 - not blanked ! */ + { 0, 1, 1, 0, 0, 0, 0 }, /* 01 */ + { 1, 1, 0, 1, 1, 0, 1 }, /* 02 */ + { 1, 1, 1, 1, 0, 0, 1 }, /* 03 */ + { 0, 1, 1, 0, 0, 1, 1 }, /* 04 */ + { 1, 0, 1, 1, 0, 1, 1 }, /* 05 */ + { 0, 0, 1, 1, 1, 1, 1 }, /* 06 */ + { 1, 1, 1, 0, 0, 0, 0 }, /* 07 */ + { 1, 1, 1, 1, 1, 1, 1 }, /* 08 */ + { 1, 1, 1, 0, 0, 1, 1 }, /* 09 */ + { 0, 0, 0, 1, 1, 0, 1 }, /* 10 */ + { 0, 0, 1, 1, 0, 0, 1 }, /* 11 */ + { 0, 1, 0, 0, 0, 1, 1 }, /* 12 */ + { 1, 0, 0, 1, 0, 1, 1 }, /* 13 */ + { 0, 0, 0, 1, 1, 1, 1 }, /* 14 */ + { 0, 0, 0, 0, 0, 0, 0 }, /* 15 */ }; NETLIB_START(nic7450) { - register_input("I1", m_I0); - register_input("I2", m_I1); - register_input("I3", m_I2); - register_input("I4", m_I3); - register_output("Q", m_Q); + register_input("I1", m_I0); + register_input("I2", m_I1); + register_input("I3", m_I2); + register_input("I4", m_I3); + register_output("Q", m_Q); } NETLIB_UPDATE(nic7450) { - m_I0.activate(); - m_I1.activate(); - m_I2.activate(); - m_I3.activate(); - UINT8 t1 = INPLOGIC(m_I0) & INPLOGIC(m_I1); - UINT8 t2 = INPLOGIC(m_I2) & INPLOGIC(m_I3); + m_I0.activate(); + m_I1.activate(); + m_I2.activate(); + m_I3.activate(); + UINT8 t1 = INPLOGIC(m_I0) & INPLOGIC(m_I1); + UINT8 t2 = INPLOGIC(m_I2) & INPLOGIC(m_I3); #if 0 - UINT8 t = (t1 | t2) ^ 1; - OUTLOGIC(m_Q, t, t ? NLTIME_FROM_NS(22) : NLTIME_FROM_NS(15)); + UINT8 t = (t1 | t2) ^ 1; + OUTLOGIC(m_Q, t, t ? NLTIME_FROM_NS(22) : NLTIME_FROM_NS(15)); #else - const netlist_time times[2] = { NLTIME_FROM_NS(22), NLTIME_FROM_NS(15) }; + const netlist_time times[2] = { NLTIME_FROM_NS(22), NLTIME_FROM_NS(15) }; - UINT8 res = 0; - if (t1 ^ 1) - { - if (t2 ^ 1) - { - res = 1; - } - else - { - m_I0.inactivate(); - m_I1.inactivate(); - } - } else { - if (t2 ^ 1) - { - m_I2.inactivate(); - m_I3.inactivate(); - } - } - OUTLOGIC(m_Q, res, times[1 - res]);// ? 22000 : 15000); + UINT8 res = 0; + if (t1 ^ 1) + { + if (t2 ^ 1) + { + res = 1; + } + else + { + m_I0.inactivate(); + m_I1.inactivate(); + } + } else { + if (t2 ^ 1) + { + m_I2.inactivate(); + m_I3.inactivate(); + } + } + OUTLOGIC(m_Q, res, times[1 - res]);// ? 22000 : 15000); #endif } @@ -221,122 +221,122 @@ NETLIB_UPDATE(nic7450) NETLIB_START(nic74107Asub) { - register_input("CLK", m_clk, netlist_input_t::STATE_INP_HL); - register_output("Q", m_Q); - register_output("QQ", m_QQ); + register_input("CLK", m_clk, netlist_input_t::STATE_INP_HL); + register_output("Q", m_Q); + register_output("QQ", m_QQ); - m_Q.initial(0); - m_QQ.initial(1); + m_Q.initial(0); + m_QQ.initial(1); - save(NAME(m_Q1)); - save(NAME(m_Q2)); - save(NAME(m_F)); + save(NAME(m_Q1)); + save(NAME(m_Q2)); + save(NAME(m_F)); } NETLIB_START(nic74107A) { - register_sub(sub, "sub"); + register_sub(sub, "sub"); - register_subalias("CLK", sub.m_clk); - register_input("J", m_J); - register_input("K", m_K); - register_input("CLRQ", m_clrQ); - register_subalias("Q", sub.m_Q); - register_subalias("QQ", sub.m_QQ); + register_subalias("CLK", sub.m_clk); + register_input("J", m_J); + register_input("K", m_K); + register_input("CLRQ", m_clrQ); + register_subalias("Q", sub.m_Q); + register_subalias("QQ", sub.m_QQ); - sub.m_Q.initial(0); - sub.m_QQ.initial(1); + sub.m_Q.initial(0); + sub.m_QQ.initial(1); } ATTR_HOT inline void NETLIB_NAME(nic74107Asub)::newstate(const netlist_sig_t state) { - const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; + const netlist_time delay[2] = { NLTIME_FROM_NS(40), NLTIME_FROM_NS(25) }; #if 1 - OUTLOGIC(m_Q, state, delay[state ^ 1]); - OUTLOGIC(m_QQ, state ^ 1, delay[state]); + OUTLOGIC(m_Q, state, delay[state ^ 1]); + OUTLOGIC(m_QQ, state ^ 1, delay[state]); #else - if (state != Q.new_Q()) - { - Q.setToNoCheck(state, delay[1-state]); - QQ.setToNoCheck(1-state, delay[state]); - } + if (state != Q.new_Q()) + { + Q.setToNoCheck(state, delay[1-state]); + QQ.setToNoCheck(1-state, delay[state]); + } #endif } NETLIB_UPDATE(nic74107Asub) { - { - const netlist_sig_t t = m_Q.net().new_Q(); - newstate((!t & m_Q1) | (t & m_Q2) | m_F); - if (!m_Q1) - m_clk.inactivate(); - } + { + const netlist_sig_t t = m_Q.net().new_Q(); + newstate((!t & m_Q1) | (t & m_Q2) | m_F); + if (!m_Q1) + m_clk.inactivate(); + } } NETLIB_UPDATE(nic74107A) { - if (INPLOGIC(m_J) & INPLOGIC(m_K)) - { - sub.m_Q1 = 1; - sub.m_Q2 = 0; - sub.m_F = 0; - } - else if (!INPLOGIC(m_J) & INPLOGIC(m_K)) - { - sub.m_Q1 = 0; - sub.m_Q2 = 0; - sub.m_F = 0; - } - else if (INPLOGIC(m_J) & !INPLOGIC(m_K)) - { - sub.m_Q1 = 0; - sub.m_Q2 = 0; - sub.m_F = 1; - } - else - { - sub.m_Q1 = 0; - sub.m_Q2 = 1; - sub.m_F = 0; - sub.m_clk.inactivate(); - } - if (!INPLOGIC(m_clrQ)) - { - sub.m_clk.inactivate(); - sub.newstate(0); - } - else if (!sub.m_Q2) - sub.m_clk.activate_hl(); - //if (!sub.m_Q2 & INPLOGIC(m_clrQ)) - // sub.m_clk.activate_hl(); + if (INPLOGIC(m_J) & INPLOGIC(m_K)) + { + sub.m_Q1 = 1; + sub.m_Q2 = 0; + sub.m_F = 0; + } + else if (!INPLOGIC(m_J) & INPLOGIC(m_K)) + { + sub.m_Q1 = 0; + sub.m_Q2 = 0; + sub.m_F = 0; + } + else if (INPLOGIC(m_J) & !INPLOGIC(m_K)) + { + sub.m_Q1 = 0; + sub.m_Q2 = 0; + sub.m_F = 1; + } + else + { + sub.m_Q1 = 0; + sub.m_Q2 = 1; + sub.m_F = 0; + sub.m_clk.inactivate(); + } + if (!INPLOGIC(m_clrQ)) + { + sub.m_clk.inactivate(); + sub.newstate(0); + } + else if (!sub.m_Q2) + sub.m_clk.activate_hl(); + //if (!sub.m_Q2 & INPLOGIC(m_clrQ)) + // sub.m_clk.activate_hl(); } NETLIB_START(nic74153) { - register_input("A1", m_I[0]); - register_input("A2", m_I[1]); - register_input("A3", m_I[2]); - register_input("A4", m_I[3]); - register_input("A", m_A); - register_input("B", m_B); - register_input("GA", m_GA); + register_input("A1", m_I[0]); + register_input("A2", m_I[1]); + register_input("A3", m_I[2]); + register_input("A4", m_I[3]); + register_input("A", m_A); + register_input("B", m_B); + register_input("GA", m_GA); - register_output("AY", m_AY); + register_output("AY", m_AY); } NETLIB_UPDATE(nic74153) { - const netlist_time delay[2] = { NLTIME_FROM_NS(23), NLTIME_FROM_NS(18) }; - if (!INPLOGIC(m_GA)) - { - UINT8 chan = (INPLOGIC(m_A) | (INPLOGIC(m_B)<<1)); - UINT8 t = INPLOGIC(m_I[chan]); - OUTLOGIC(m_AY, t, delay[t] ); /* data to y only, FIXME */ - } - else - { - OUTLOGIC(m_AY, 0, delay[0]); - } + const netlist_time delay[2] = { NLTIME_FROM_NS(23), NLTIME_FROM_NS(18) }; + if (!INPLOGIC(m_GA)) + { + UINT8 chan = (INPLOGIC(m_A) | (INPLOGIC(m_B)<<1)); + UINT8 t = INPLOGIC(m_I[chan]); + OUTLOGIC(m_AY, t, delay[t] ); /* data to y only, FIXME */ + } + else + { + OUTLOGIC(m_AY, 0, delay[0]); + } } @@ -346,93 +346,91 @@ NETLIB_UPDATE(nic74153) netlist_factory::netlist_factory() { - } netlist_factory::~netlist_factory() { - for (list_t::entry_t *e = m_list.first(); e != NULL; e = m_list.next(e)) - { - net_device_t_base_factory *p = e->object(); - delete p; - } - m_list.reset(); + for (list_t::entry_t *e = m_list.first(); e != NULL; e = m_list.next(e)) + { + net_device_t_base_factory *p = e->object(); + delete p; + } + m_list.reset(); } void netlist_factory::initialize() { - ENTRY(R, NETDEV_R) - ENTRY(POT, NETDEV_POT) - ENTRY(C, NETDEV_C) - ENTRY(D, NETDEV_D) - ENTRY(VCVS, NETDEV_VCVS) - ENTRY(VCCS, NETDEV_VCCS) - ENTRY(QPNP_switch, NETDEV_QPNP) - ENTRY(QNPN_switch, NETDEV_QNPN) - ENTRY(ttl_const, NETDEV_TTL_CONST) - ENTRY(analog_const, NETDEV_ANALOG_CONST) - ENTRY(logic_input, NETDEV_LOGIC_INPUT) - ENTRY(analog_input, NETDEV_ANALOG_INPUT) - ENTRY(log, NETDEV_LOG) - ENTRY(logD, NETDEV_LOGD) - ENTRY(clock, NETDEV_CLOCK) - ENTRY(mainclock, NETDEV_MAINCLOCK) - ENTRY(solver, NETDEV_SOLVER) - ENTRY(nicMultiSwitch, NETDEV_SWITCH2) - ENTRY(nicRSFF, NETDEV_RSFF) - ENTRY(nicMixer8, NETDEV_MIXER) - ENTRY(7400, TTL_7400_NAND) - ENTRY(7402, TTL_7402_NOR) - ENTRY(nic7404, TTL_7404_INVERT) - ENTRY(7410, TTL_7410_NAND) - ENTRY(7420, TTL_7420_NAND) - ENTRY(7425, TTL_7425_NOR) - ENTRY(7427, TTL_7427_NOR) - ENTRY(7430, TTL_7430_NAND) - ENTRY(nic7450, TTL_7450_ANDORINVERT) - ENTRY(7486, TTL_7486_XOR) - ENTRY(nic7448, TTL_7448) - ENTRY(7474, TTL_7474) - ENTRY(7483, TTL_7483) - ENTRY(7490, TTL_7490) - ENTRY(7493, TTL_7493) - ENTRY(nic74107, TTL_74107) - ENTRY(nic74107A, TTL_74107A) - ENTRY(nic74153, TTL_74153) - ENTRY(9316, TTL_9316) - ENTRY(NE555, NETDEV_NE555) - ENTRY(nicNE555N_MSTABLE, NE555N_MSTABLE) + ENTRY(R, NETDEV_R) + ENTRY(POT, NETDEV_POT) + ENTRY(C, NETDEV_C) + ENTRY(D, NETDEV_D) + ENTRY(VCVS, NETDEV_VCVS) + ENTRY(VCCS, NETDEV_VCCS) + ENTRY(QPNP_switch, NETDEV_QPNP) + ENTRY(QNPN_switch, NETDEV_QNPN) + ENTRY(ttl_const, NETDEV_TTL_CONST) + ENTRY(analog_const, NETDEV_ANALOG_CONST) + ENTRY(logic_input, NETDEV_LOGIC_INPUT) + ENTRY(analog_input, NETDEV_ANALOG_INPUT) + ENTRY(log, NETDEV_LOG) + ENTRY(logD, NETDEV_LOGD) + ENTRY(clock, NETDEV_CLOCK) + ENTRY(mainclock, NETDEV_MAINCLOCK) + ENTRY(solver, NETDEV_SOLVER) + ENTRY(nicMultiSwitch, NETDEV_SWITCH2) + ENTRY(nicRSFF, NETDEV_RSFF) + ENTRY(nicMixer8, NETDEV_MIXER) + ENTRY(7400, TTL_7400_NAND) + ENTRY(7402, TTL_7402_NOR) + ENTRY(nic7404, TTL_7404_INVERT) + ENTRY(7410, TTL_7410_NAND) + ENTRY(7420, TTL_7420_NAND) + ENTRY(7425, TTL_7425_NOR) + ENTRY(7427, TTL_7427_NOR) + ENTRY(7430, TTL_7430_NAND) + ENTRY(nic7450, TTL_7450_ANDORINVERT) + ENTRY(7486, TTL_7486_XOR) + ENTRY(nic7448, TTL_7448) + ENTRY(7474, TTL_7474) + ENTRY(7483, TTL_7483) + ENTRY(7490, TTL_7490) + ENTRY(7493, TTL_7493) + ENTRY(nic74107, TTL_74107) + ENTRY(nic74107A, TTL_74107A) + ENTRY(nic74153, TTL_74153) + ENTRY(9316, TTL_9316) + ENTRY(NE555, NETDEV_NE555) + ENTRY(nicNE555N_MSTABLE, NE555N_MSTABLE) } netlist_device_t *netlist_factory::new_device_by_classname(const pstring &classname, netlist_setup_t &setup) const { - for (list_t::entry_t *e = m_list.first(); e != NULL; e = m_list.next(e)) - { - net_device_t_base_factory *p = e->object(); - if (strcmp(p->classname(), classname) == 0) - { - netlist_device_t *ret = p->Create(); - return ret; - } - p++; - } - setup.netlist().xfatalerror("Class %s not found!\n", classname.cstr()); - return NULL; // appease code analysis + for (list_t::entry_t *e = m_list.first(); e != NULL; e = m_list.next(e)) + { + net_device_t_base_factory *p = e->object(); + if (strcmp(p->classname(), classname) == 0) + { + netlist_device_t *ret = p->Create(); + return ret; + } + p++; + } + setup.netlist().xfatalerror("Class %s not found!\n", classname.cstr()); + return NULL; // appease code analysis } netlist_device_t *netlist_factory::new_device_by_name(const pstring &name, netlist_setup_t &setup) const { - for (list_t::entry_t *e = m_list.first(); e != NULL; e = m_list.next(e)) - { - net_device_t_base_factory *p = e->object(); - if (strcmp(p->name(), name) == 0) - { - netlist_device_t *ret = p->Create(); - return ret; - } - p++; - } - setup.netlist().xfatalerror("Class %s not found!\n", name.cstr()); - return NULL; // appease code analysis + for (list_t::entry_t *e = m_list.first(); e != NULL; e = m_list.next(e)) + { + net_device_t_base_factory *p = e->object(); + if (strcmp(p->name(), name) == 0) + { + netlist_device_t *ret = p->Create(); + return ret; + } + p++; + } + setup.netlist().xfatalerror("Class %s not found!\n", name.cstr()); + return NULL; // appease code analysis } - diff --git a/src/emu/netlist/devices/net_lib.h b/src/emu/netlist/devices/net_lib.h index da225bc3f1..2c696588f9 100644 --- a/src/emu/netlist/devices/net_lib.h +++ b/src/emu/netlist/devices/net_lib.h @@ -136,7 +136,7 @@ NETLIB_DEVICE(nic7450, */ NETLIB_SUBDEVICE(nic74107Asub, - netlist_ttl_input_t m_clk; + netlist_ttl_input_t m_clk; netlist_ttl_output_t m_Q; netlist_ttl_output_t m_QQ; diff --git a/src/emu/netlist/devices/nld_7400.h b/src/emu/netlist/devices/nld_7400.h index 809ea87334..76af3043c4 100644 --- a/src/emu/netlist/devices/nld_7400.h +++ b/src/emu/netlist/devices/nld_7400.h @@ -43,34 +43,34 @@ NETLIB_SIGNAL(7400, 2, 0, 0); NETLIB_DEVICE(7400pin, - NETLIB_NAME(7400) m_1; - NETLIB_NAME(7400) m_2; - NETLIB_NAME(7400) m_3; - NETLIB_NAME(7400) m_4; + NETLIB_NAME(7400) m_1; + NETLIB_NAME(7400) m_2; + NETLIB_NAME(7400) m_3; + NETLIB_NAME(7400) m_4; ); inline NETLIB_START(7400pin) { - register_sub(m_1, "1"); - register_sub(m_2, "2"); - register_sub(m_3, "3"); - register_sub(m_4, "4"); + 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[0]); - register_subalias("2", m_1.m_i[1]); - register_subalias("3", m_1.m_Q); + register_subalias("1", m_1.m_i[0]); + register_subalias("2", m_1.m_i[1]); + register_subalias("3", m_1.m_Q); - register_subalias("4", m_2.m_i[0]); - register_subalias("5", m_2.m_i[1]); - register_subalias("6", m_2.m_Q); + register_subalias("4", m_2.m_i[0]); + register_subalias("5", m_2.m_i[1]); + register_subalias("6", m_2.m_Q); - register_subalias("9", m_3.m_i[0]); - register_subalias("10", m_3.m_i[1]); - 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("8", m_3.m_Q); - register_subalias("12", m_4.m_i[0]); - register_subalias("13", m_4.m_i[1]); - register_subalias("11", m_4.m_Q); + register_subalias("12", m_4.m_i[0]); + register_subalias("13", m_4.m_i[1]); + register_subalias("11", m_4.m_Q); } #endif /* NLD_7400_H_ */ diff --git a/src/emu/netlist/devices/nld_7402.h b/src/emu/netlist/devices/nld_7402.h index 0d5990478c..63a91d25ce 100644 --- a/src/emu/netlist/devices/nld_7402.h +++ b/src/emu/netlist/devices/nld_7402.h @@ -35,9 +35,9 @@ #include "nld_signal.h" #define TTL_7402_NOR(_name, _I1, _I2) \ - NET_REGISTER_DEV(7402, _name) \ - NET_CONNECT(_name, A, _I1) \ - NET_CONNECT(_name, B, _I2) + NET_REGISTER_DEV(7402, _name) \ + NET_CONNECT(_name, A, _I1) \ + NET_CONNECT(_name, B, _I2) NETLIB_SIGNAL(7402, 2, 1, 0); diff --git a/src/emu/netlist/devices/nld_7404.c b/src/emu/netlist/devices/nld_7404.c index e285eb54f0..42b7e341c3 100644 --- a/src/emu/netlist/devices/nld_7404.c +++ b/src/emu/netlist/devices/nld_7404.c @@ -7,14 +7,14 @@ NETLIB_START(nic7404) { - register_input("A", m_I); - register_output("Q", m_Q); - m_Q.initial(1); + register_input("A", m_I); + register_output("Q", m_Q); + m_Q.initial(1); } NETLIB_UPDATE(nic7404) { - static const netlist_time delay[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) }; - UINT8 t = (INPLOGIC(m_I)) ^ 1; - OUTLOGIC(m_Q, t, delay[t]); + static const netlist_time delay[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) }; + UINT8 t = (INPLOGIC(m_I)) ^ 1; + OUTLOGIC(m_Q, t, delay[t]); } diff --git a/src/emu/netlist/devices/nld_7404.h b/src/emu/netlist/devices/nld_7404.h index 15c16652f7..5432a1dd9f 100644 --- a/src/emu/netlist/devices/nld_7404.h +++ b/src/emu/netlist/devices/nld_7404.h @@ -33,12 +33,12 @@ #include "nld_signal.h" NETLIB_DEVICE(nic7404, - netlist_ttl_input_t m_I; - netlist_ttl_output_t m_Q; + netlist_ttl_input_t m_I; + netlist_ttl_output_t m_Q; ); #define TTL_7404_INVERT(_name, _A) \ - NET_REGISTER_DEV(nic7404, _name) \ - NET_CONNECT(_name, A, _A) + NET_REGISTER_DEV(nic7404, _name) \ + NET_CONNECT(_name, A, _A) #endif /* NLD_7404_H_ */ diff --git a/src/emu/netlist/devices/nld_7410.h b/src/emu/netlist/devices/nld_7410.h index 860d5fcab2..b8a1c55aee 100644 --- a/src/emu/netlist/devices/nld_7410.h +++ b/src/emu/netlist/devices/nld_7410.h @@ -35,10 +35,10 @@ #include "nld_signal.h" #define TTL_7410_NAND(_name, _I1, _I2, _I3) \ - NET_REGISTER_DEV(7410, _name) \ - NET_CONNECT(_name, A, _I1) \ - NET_CONNECT(_name, B, _I2) \ - NET_CONNECT(_name, C, _I3) + NET_REGISTER_DEV(7410, _name) \ + NET_CONNECT(_name, A, _I1) \ + NET_CONNECT(_name, B, _I2) \ + NET_CONNECT(_name, C, _I3) NETLIB_SIGNAL(7410, 3, 0, 0); diff --git a/src/emu/netlist/devices/nld_7420.h b/src/emu/netlist/devices/nld_7420.h index 5ff5bd12ac..6ac7c47774 100644 --- a/src/emu/netlist/devices/nld_7420.h +++ b/src/emu/netlist/devices/nld_7420.h @@ -36,11 +36,11 @@ #include "nld_signal.h" #define TTL_7420_NAND(_name, _I1, _I2, _I3, _I4) \ - NET_REGISTER_DEV(7420, _name) \ - NET_CONNECT(_name, A, _I1) \ - NET_CONNECT(_name, B, _I2) \ - NET_CONNECT(_name, C, _I3) \ - NET_CONNECT(_name, D, _I4) + NET_REGISTER_DEV(7420, _name) \ + NET_CONNECT(_name, A, _I1) \ + NET_CONNECT(_name, B, _I2) \ + NET_CONNECT(_name, C, _I3) \ + NET_CONNECT(_name, D, _I4) NETLIB_SIGNAL(7420, 4, 0, 0); diff --git a/src/emu/netlist/devices/nld_7425.h b/src/emu/netlist/devices/nld_7425.h index 5e2fff4f94..26ae9b8476 100644 --- a/src/emu/netlist/devices/nld_7425.h +++ b/src/emu/netlist/devices/nld_7425.h @@ -39,11 +39,11 @@ #include "nld_signal.h" #define TTL_7425_NOR(_name, _I1, _I2, _I3, _I4) \ - NET_REGISTER_DEV(7425, _name) \ - NET_CONNECT(_name, A, _I1) \ - NET_CONNECT(_name, B, _I2) \ - NET_CONNECT(_name, C, _I3) \ - NET_CONNECT(_name, D, _I4) + NET_REGISTER_DEV(7425, _name) \ + NET_CONNECT(_name, A, _I1) \ + NET_CONNECT(_name, B, _I2) \ + NET_CONNECT(_name, C, _I3) \ + NET_CONNECT(_name, D, _I4) NETLIB_SIGNAL(7425, 4, 1, 0); diff --git a/src/emu/netlist/devices/nld_7427.h b/src/emu/netlist/devices/nld_7427.h index c5a8ede870..9863acc9f5 100644 --- a/src/emu/netlist/devices/nld_7427.h +++ b/src/emu/netlist/devices/nld_7427.h @@ -35,10 +35,10 @@ #include "nld_signal.h" #define TTL_7427_NOR(_name, _I1, _I2, _I3) \ - NET_REGISTER_DEV(7427, _name) \ - NET_CONNECT(_name, A, _I1) \ - NET_CONNECT(_name, B, _I2) \ - NET_CONNECT(_name, C, _I3) + NET_REGISTER_DEV(7427, _name) \ + NET_CONNECT(_name, A, _I1) \ + NET_CONNECT(_name, B, _I2) \ + NET_CONNECT(_name, C, _I3) NETLIB_SIGNAL(7427, 3, 1, 0); diff --git a/src/emu/netlist/devices/nld_7430.h b/src/emu/netlist/devices/nld_7430.h index 783e8bb681..2d9ff87f38 100644 --- a/src/emu/netlist/devices/nld_7430.h +++ b/src/emu/netlist/devices/nld_7430.h @@ -40,15 +40,15 @@ #include "nld_signal.h" #define TTL_7430_NAND(_name, _I1, _I2, _I3, _I4, _I5, _I6, _I7, _I8) \ - NET_REGISTER_DEV(7430, _name) \ - NET_CONNECT(_name, A, _I1) \ - NET_CONNECT(_name, B, _I2) \ - NET_CONNECT(_name, C, _I3) \ - NET_CONNECT(_name, D, _I4) \ - NET_CONNECT(_name, E, _I5) \ - NET_CONNECT(_name, F, _I6) \ - NET_CONNECT(_name, G, _I7) \ - NET_CONNECT(_name, H, _I8) + NET_REGISTER_DEV(7430, _name) \ + NET_CONNECT(_name, A, _I1) \ + NET_CONNECT(_name, B, _I2) \ + NET_CONNECT(_name, C, _I3) \ + NET_CONNECT(_name, D, _I4) \ + NET_CONNECT(_name, E, _I5) \ + NET_CONNECT(_name, F, _I6) \ + NET_CONNECT(_name, G, _I7) \ + NET_CONNECT(_name, H, _I8) NETLIB_SIGNAL(7430, 8, 0, 0); diff --git a/src/emu/netlist/devices/nld_7474.c b/src/emu/netlist/devices/nld_7474.c index cd9e64e41a..ef23fe819c 100644 --- a/src/emu/netlist/devices/nld_7474.c +++ b/src/emu/netlist/devices/nld_7474.c @@ -7,63 +7,63 @@ ATTR_HOT inline void NETLIB_NAME(7474sub)::newstate(const UINT8 state) { - static const netlist_time delay[2] = { NLTIME_FROM_NS(25), NLTIME_FROM_NS(40) }; - OUTLOGIC(m_Q, state, delay[state]); - OUTLOGIC(m_QQ, !state, delay[!state]); + static const netlist_time delay[2] = { NLTIME_FROM_NS(25), NLTIME_FROM_NS(40) }; + OUTLOGIC(m_Q, state, delay[state]); + OUTLOGIC(m_QQ, !state, delay[!state]); } NETLIB_UPDATE(7474sub) { - //if (!INP_LAST(m_clk) & INP(m_clk)) - { - newstate(m_nextD); - m_clk.inactivate(); - } + //if (!INP_LAST(m_clk) & INP(m_clk)) + { + newstate(m_nextD); + m_clk.inactivate(); + } } NETLIB_UPDATE(7474) { - if (!INPLOGIC(m_preQ)) - { - sub.newstate(1); - sub.m_clk.inactivate(); - m_D.inactivate(); - } - else if (!INPLOGIC(m_clrQ)) - { - sub.newstate(0); - sub.m_clk.inactivate(); - m_D.inactivate(); - } - else - { - m_D.activate(); - sub.m_nextD = INPLOGIC(m_D); - sub.m_clk.activate_lh(); - } + if (!INPLOGIC(m_preQ)) + { + sub.newstate(1); + sub.m_clk.inactivate(); + m_D.inactivate(); + } + else if (!INPLOGIC(m_clrQ)) + { + sub.newstate(0); + sub.m_clk.inactivate(); + m_D.inactivate(); + } + else + { + m_D.activate(); + sub.m_nextD = INPLOGIC(m_D); + sub.m_clk.activate_lh(); + } } NETLIB_START(7474) { - register_sub(sub, "sub"); + register_sub(sub, "sub"); - register_subalias("CLK", sub.m_clk); - register_input("D", m_D); - register_input("CLRQ", m_clrQ); - register_input("PREQ", m_preQ); + register_subalias("CLK", sub.m_clk); + register_input("D", m_D); + register_input("CLRQ", m_clrQ); + register_input("PREQ", m_preQ); - register_subalias("Q", sub.m_Q); - register_subalias("QQ", sub.m_QQ); + register_subalias("Q", sub.m_Q); + register_subalias("QQ", sub.m_QQ); } NETLIB_START(7474sub) { - register_input("CLK", m_clk, netlist_input_t::STATE_INP_LH); + register_input("CLK", m_clk, netlist_input_t::STATE_INP_LH); - register_output("Q", m_Q); - register_output("QQ", m_QQ); + register_output("Q", m_Q); + register_output("QQ", m_QQ); - m_Q.initial(1); - m_QQ.initial(0); + m_Q.initial(1); + m_QQ.initial(0); } diff --git a/src/emu/netlist/devices/nld_7474.h b/src/emu/netlist/devices/nld_7474.h index 91375f479e..31cf80e0d6 100644 --- a/src/emu/netlist/devices/nld_7474.h +++ b/src/emu/netlist/devices/nld_7474.h @@ -45,28 +45,28 @@ #include "nld_signal.h" #define TTL_7474(_name, _CLK, _D, _CLRQ, _PREQ) \ - NET_REGISTER_DEV(7474, _name) \ - NET_CONNECT(_name, CLK, _CLK) \ - NET_CONNECT(_name, D, _D) \ - NET_CONNECT(_name, CLRQ, _CLRQ) \ - NET_CONNECT(_name, PREQ, _PREQ) + NET_REGISTER_DEV(7474, _name) \ + NET_CONNECT(_name, CLK, _CLK) \ + NET_CONNECT(_name, D, _D) \ + NET_CONNECT(_name, CLRQ, _CLRQ) \ + NET_CONNECT(_name, PREQ, _PREQ) NETLIB_SUBDEVICE(7474sub, - netlist_ttl_input_t m_clk; + netlist_ttl_input_t m_clk; - UINT8 m_nextD; - netlist_ttl_output_t m_Q; - netlist_ttl_output_t m_QQ; + UINT8 m_nextD; + netlist_ttl_output_t m_Q; + netlist_ttl_output_t m_QQ; - ATTR_HOT inline void newstate(const UINT8 state); + ATTR_HOT inline void newstate(const UINT8 state); ); NETLIB_DEVICE(7474, - NETLIB_NAME(7474sub) sub; + NETLIB_NAME(7474sub) sub; - netlist_ttl_input_t m_D; - netlist_ttl_input_t m_clrQ; - netlist_ttl_input_t m_preQ; + netlist_ttl_input_t m_D; + netlist_ttl_input_t m_clrQ; + netlist_ttl_input_t m_preQ; ); diff --git a/src/emu/netlist/devices/nld_7483.c b/src/emu/netlist/devices/nld_7483.c index eca6184624..81624326d6 100644 --- a/src/emu/netlist/devices/nld_7483.c +++ b/src/emu/netlist/devices/nld_7483.c @@ -7,42 +7,41 @@ NETLIB_START(7483) { - m_lastr = 0; + m_lastr = 0; - register_input("A1", m_A1); - register_input("A2", m_A2); - register_input("A3", m_A3); - register_input("A4", m_A4); - register_input("B1", m_B1); - register_input("B2", m_B2); - register_input("B3", m_B3); - register_input("B4", m_B4); - register_input("C0", m_C0); + register_input("A1", m_A1); + register_input("A2", m_A2); + register_input("A3", m_A3); + register_input("A4", m_A4); + register_input("B1", m_B1); + register_input("B2", m_B2); + register_input("B3", m_B3); + register_input("B4", m_B4); + register_input("C0", m_C0); - register_output("SA", m_SA); - register_output("SB", m_SB); - register_output("SC", m_SC); - register_output("SD", m_SD); - register_output("C4", m_C4); + register_output("SA", m_SA); + register_output("SB", m_SB); + register_output("SC", m_SC); + register_output("SD", m_SD); + register_output("C4", m_C4); - save(NAME(m_lastr)); + save(NAME(m_lastr)); } NETLIB_UPDATE(7483) { - UINT8 a = (INPLOGIC(m_A1) << 0) | (INPLOGIC(m_A2) << 1) | (INPLOGIC(m_A3) << 2) | (INPLOGIC(m_A4) << 3); - UINT8 b = (INPLOGIC(m_B1) << 0) | (INPLOGIC(m_B2) << 1) | (INPLOGIC(m_B3) << 2) | (INPLOGIC(m_B4) << 3); + UINT8 a = (INPLOGIC(m_A1) << 0) | (INPLOGIC(m_A2) << 1) | (INPLOGIC(m_A3) << 2) | (INPLOGIC(m_A4) << 3); + UINT8 b = (INPLOGIC(m_B1) << 0) | (INPLOGIC(m_B2) << 1) | (INPLOGIC(m_B3) << 2) | (INPLOGIC(m_B4) << 3); - UINT8 r = a + b + INPLOGIC(m_C0); + UINT8 r = a + b + INPLOGIC(m_C0); - if (r != m_lastr) - { - m_lastr = r; - OUTLOGIC(m_SA, (r >> 0) & 1, NLTIME_FROM_NS(23)); - OUTLOGIC(m_SB, (r >> 1) & 1, NLTIME_FROM_NS(23)); - OUTLOGIC(m_SC, (r >> 2) & 1, NLTIME_FROM_NS(23)); - OUTLOGIC(m_SD, (r >> 3) & 1, NLTIME_FROM_NS(23)); - OUTLOGIC(m_C4, (r >> 4) & 1, NLTIME_FROM_NS(23)); - } + if (r != m_lastr) + { + m_lastr = r; + OUTLOGIC(m_SA, (r >> 0) & 1, NLTIME_FROM_NS(23)); + OUTLOGIC(m_SB, (r >> 1) & 1, NLTIME_FROM_NS(23)); + OUTLOGIC(m_SC, (r >> 2) & 1, NLTIME_FROM_NS(23)); + OUTLOGIC(m_SD, (r >> 3) & 1, NLTIME_FROM_NS(23)); + OUTLOGIC(m_C4, (r >> 4) & 1, NLTIME_FROM_NS(23)); + } } - diff --git a/src/emu/netlist/devices/nld_7483.h b/src/emu/netlist/devices/nld_7483.h index 5900b33cc0..2f45743584 100644 --- a/src/emu/netlist/devices/nld_7483.h +++ b/src/emu/netlist/devices/nld_7483.h @@ -7,16 +7,16 @@ * * +--------------+ * A4 |1 ++ 16| B4 - * Ʃ3 |2 15| Ʃ3 + * ??3 |2 15| ??3 * A3 |3 14| C4 * B3 |4 7483 13| C0 * VCC |5 12| GND - * Ʃ3 |6 11| B1 + * ??3 |6 11| B1 * B2 |7 10| A1 - * A2 |8 9| Ʃ3 + * A2 |8 9| ??3 * +--------------+ * - * Ʃ = (A + B + C) & 0x0f + * ?? = (A + B + C) & 0x0f * * C4 = (A + B + C) > 15 ? 1 : 0 * @@ -30,35 +30,35 @@ #include "../nl_base.h" #define TTL_7483(_name, _A1, _A2, _A3, _A4, _B1, _B2, _B3, _B4, _CI) \ - NET_REGISTER_DEV(7483, _name) \ - NET_CONNECT(_name, A1, _A1) \ - NET_CONNECT(_name, A2, _A2) \ - NET_CONNECT(_name, A3, _A3) \ - NET_CONNECT(_name, A4, _A4) \ - NET_CONNECT(_name, B1, _B1) \ - NET_CONNECT(_name, B2, _B2) \ - NET_CONNECT(_name, B3, _B3) \ - NET_CONNECT(_name, B4, _B4) \ - NET_CONNECT(_name, C0, _CI) + NET_REGISTER_DEV(7483, _name) \ + NET_CONNECT(_name, A1, _A1) \ + NET_CONNECT(_name, A2, _A2) \ + NET_CONNECT(_name, A3, _A3) \ + NET_CONNECT(_name, A4, _A4) \ + NET_CONNECT(_name, B1, _B1) \ + NET_CONNECT(_name, B2, _B2) \ + NET_CONNECT(_name, B3, _B3) \ + NET_CONNECT(_name, B4, _B4) \ + NET_CONNECT(_name, C0, _CI) NETLIB_DEVICE(7483, - netlist_ttl_input_t m_C0; - netlist_ttl_input_t m_A1; - netlist_ttl_input_t m_A2; - netlist_ttl_input_t m_A3; - netlist_ttl_input_t m_A4; - netlist_ttl_input_t m_B1; - netlist_ttl_input_t m_B2; - netlist_ttl_input_t m_B3; - netlist_ttl_input_t m_B4; + netlist_ttl_input_t m_C0; + netlist_ttl_input_t m_A1; + netlist_ttl_input_t m_A2; + netlist_ttl_input_t m_A3; + netlist_ttl_input_t m_A4; + netlist_ttl_input_t m_B1; + netlist_ttl_input_t m_B2; + netlist_ttl_input_t m_B3; + netlist_ttl_input_t m_B4; - UINT8 m_lastr; + UINT8 m_lastr; - netlist_ttl_output_t m_SA; - netlist_ttl_output_t m_SB; - netlist_ttl_output_t m_SC; - netlist_ttl_output_t m_SD; - netlist_ttl_output_t m_C4; + netlist_ttl_output_t m_SA; + netlist_ttl_output_t m_SB; + netlist_ttl_output_t m_SC; + netlist_ttl_output_t m_SD; + netlist_ttl_output_t m_C4; ); diff --git a/src/emu/netlist/devices/nld_7486.c b/src/emu/netlist/devices/nld_7486.c index 55fa712e9a..fcd94c9f32 100644 --- a/src/emu/netlist/devices/nld_7486.c +++ b/src/emu/netlist/devices/nld_7486.c @@ -7,15 +7,14 @@ NETLIB_START(7486) { - register_input("A", m_A); - register_input("B", m_B); - register_output("Q", m_Q); + register_input("A", m_A); + register_input("B", m_B); + register_output("Q", m_Q); } NETLIB_UPDATE(7486) { - static const netlist_time delay[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) }; - UINT8 t = INPLOGIC(m_A) ^ INPLOGIC(m_B); - OUTLOGIC(m_Q, t, delay[t]); + static const netlist_time delay[2] = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) }; + UINT8 t = INPLOGIC(m_A) ^ INPLOGIC(m_B); + OUTLOGIC(m_Q, t, delay[t]); } - diff --git a/src/emu/netlist/devices/nld_7486.h b/src/emu/netlist/devices/nld_7486.h index b00d8905ae..d4fd3d5cda 100644 --- a/src/emu/netlist/devices/nld_7486.h +++ b/src/emu/netlist/devices/nld_7486.h @@ -35,13 +35,13 @@ #include "nld_signal.h" #define TTL_7486_XOR(_name, _A, _B) \ - NET_REGISTER_DEV(7486, _name) \ - NET_CONNECT(_name, A, _A) \ - NET_CONNECT(_name, B, _B) + NET_REGISTER_DEV(7486, _name) \ + NET_CONNECT(_name, A, _A) \ + NET_CONNECT(_name, B, _B) NETLIB_DEVICE(7486, - netlist_ttl_input_t m_A; - netlist_ttl_input_t m_B; - netlist_ttl_output_t m_Q; + netlist_ttl_input_t m_A; + netlist_ttl_input_t m_B; + netlist_ttl_output_t m_Q; ); #endif /* NLD_7486_H_ */ diff --git a/src/emu/netlist/devices/nld_7490.c b/src/emu/netlist/devices/nld_7490.c index 48b8bbc6b5..cc84a1389c 100644 --- a/src/emu/netlist/devices/nld_7490.c +++ b/src/emu/netlist/devices/nld_7490.c @@ -7,47 +7,47 @@ NETLIB_START(7490) { - m_cnt = 0; + m_cnt = 0; - register_input("CLK", m_clk); - register_input("R1", m_R1); - register_input("R2", m_R2); - register_input("R91", m_R91); - register_input("R92", m_R92); + register_input("CLK", m_clk); + register_input("R1", m_R1); + register_input("R2", m_R2); + register_input("R91", m_R91); + register_input("R92", m_R92); - 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("QA", m_Q[0]); + register_output("QB", m_Q[1]); + register_output("QC", m_Q[2]); + register_output("QD", m_Q[3]); - save(NAME(m_cnt)); + save(NAME(m_cnt)); } NETLIB_UPDATE(7490) { - if (INPLOGIC(m_R91) & INPLOGIC(m_R92)) - { - m_cnt = 9; - update_outputs(); - } - else if (INPLOGIC(m_R1) & INPLOGIC(m_R2)) - { - m_cnt = 0; - update_outputs(); - } - else if (INP_HL(m_clk)) - { - m_cnt++; - if (m_cnt >= 10) - m_cnt = 0; - update_outputs(); - } + if (INPLOGIC(m_R91) & INPLOGIC(m_R92)) + { + m_cnt = 9; + update_outputs(); + } + else if (INPLOGIC(m_R1) & INPLOGIC(m_R2)) + { + m_cnt = 0; + update_outputs(); + } + else if (INP_HL(m_clk)) + { + m_cnt++; + if (m_cnt >= 10) + m_cnt = 0; + update_outputs(); + } } NETLIB_FUNC_VOID(7490, update_outputs, (void)) { - const netlist_time delay[4] = { NLTIME_FROM_NS(18), NLTIME_FROM_NS(36), NLTIME_FROM_NS(54), NLTIME_FROM_NS(72) }; - for (int i=0; i<4; i++) - OUTLOGIC(m_Q[i], (m_cnt >> i) & 1, delay[i]); + const netlist_time delay[4] = { NLTIME_FROM_NS(18), NLTIME_FROM_NS(36), NLTIME_FROM_NS(54), NLTIME_FROM_NS(72) }; + for (int i=0; i<4; i++) + OUTLOGIC(m_Q[i], (m_cnt >> i) & 1, delay[i]); } diff --git a/src/emu/netlist/devices/nld_7490.h b/src/emu/netlist/devices/nld_7490.h index a5380a21ca..288f2cc886 100644 --- a/src/emu/netlist/devices/nld_7490.h +++ b/src/emu/netlist/devices/nld_7490.h @@ -58,26 +58,26 @@ #include "../nl_base.h" #define TTL_7490(_name, _CLK, _R1, _R2, _R91, _R92) \ - NET_REGISTER_DEV(7490, _name) \ - NET_CONNECT(_name, CLK, _CLK) \ - NET_CONNECT(_name, R1, _R1) \ - NET_CONNECT(_name, R2, _R2) \ - NET_CONNECT(_name, R91, _R91) \ - NET_CONNECT(_name, R92, _R92) + NET_REGISTER_DEV(7490, _name) \ + NET_CONNECT(_name, CLK, _CLK) \ + NET_CONNECT(_name, R1, _R1) \ + NET_CONNECT(_name, R2, _R2) \ + NET_CONNECT(_name, R91, _R91) \ + NET_CONNECT(_name, R92, _R92) NETLIB_DEVICE(7490, - ATTR_HOT void update_outputs(); + ATTR_HOT void update_outputs(); - netlist_ttl_input_t m_R1; - netlist_ttl_input_t m_R2; - netlist_ttl_input_t m_R91; - netlist_ttl_input_t m_R92; - netlist_ttl_input_t m_clk; + netlist_ttl_input_t m_R1; + netlist_ttl_input_t m_R2; + netlist_ttl_input_t m_R91; + netlist_ttl_input_t m_R92; + netlist_ttl_input_t m_clk; - UINT8 m_cnt; + UINT8 m_cnt; - netlist_ttl_output_t m_Q[4]; + netlist_ttl_output_t m_Q[4]; ); #endif /* NLD_7490_H_ */ diff --git a/src/emu/netlist/devices/nld_7493.c b/src/emu/netlist/devices/nld_7493.c index a8c218de5a..ac633df081 100644 --- a/src/emu/netlist/devices/nld_7493.c +++ b/src/emu/netlist/devices/nld_7493.c @@ -7,59 +7,59 @@ NETLIB_START(7493) { - register_sub(A, "A"); - register_sub(B, "B"); - register_sub(C, "C"); - register_sub(D, "D"); + register_sub(A, "A"); + register_sub(B, "B"); + register_sub(C, "C"); + register_sub(D, "D"); - register_subalias("CLKA", A.m_I); - register_subalias("CLKB", B.m_I); - register_input("R1", m_R1); - register_input("R2", m_R2); + register_subalias("CLKA", A.m_I); + register_subalias("CLKB", B.m_I); + register_input("R1", m_R1); + register_input("R2", m_R2); - register_subalias("QA", A.m_Q); - register_subalias("QB", B.m_Q); - register_subalias("QC", C.m_Q); - register_subalias("QD", D.m_Q); + register_subalias("QA", A.m_Q); + register_subalias("QB", B.m_Q); + register_subalias("QC", C.m_Q); + register_subalias("QD", D.m_Q); - register_link_internal(C, C.m_I, B.m_Q, netlist_input_t::STATE_INP_HL); - register_link_internal(D, D.m_I, C.m_Q, netlist_input_t::STATE_INP_HL); + register_link_internal(C, C.m_I, B.m_Q, netlist_input_t::STATE_INP_HL); + register_link_internal(D, D.m_I, C.m_Q, netlist_input_t::STATE_INP_HL); } NETLIB_START(7493ff) { - m_reset = 0; + m_reset = 0; - register_input("CLK", m_I, netlist_input_t::STATE_INP_HL); - register_output("Q", m_Q); + register_input("CLK", m_I, netlist_input_t::STATE_INP_HL); + register_output("Q", m_Q); - save(NAME(m_reset)); + save(NAME(m_reset)); } NETLIB_UPDATE(7493ff) { - if (m_reset == 0) - OUTLOGIC(m_Q, !m_Q.net().new_Q(), NLTIME_FROM_NS(18)); + if (m_reset == 0) + OUTLOGIC(m_Q, !m_Q.net().new_Q(), NLTIME_FROM_NS(18)); } NETLIB_UPDATE(7493) { - netlist_sig_t r = INPLOGIC(m_R1) & INPLOGIC(m_R2); + netlist_sig_t r = INPLOGIC(m_R1) & INPLOGIC(m_R2); - if (r) - { - A.m_reset = B.m_reset = C.m_reset = D.m_reset = 1; - A.m_I.inactivate(); - B.m_I.inactivate(); - OUTLOGIC(A.m_Q, 0, NLTIME_FROM_NS(40)); - OUTLOGIC(B.m_Q, 0, NLTIME_FROM_NS(40)); - OUTLOGIC(C.m_Q, 0, NLTIME_FROM_NS(40)); - OUTLOGIC(D.m_Q, 0, NLTIME_FROM_NS(40)); - } - else - { - A.m_reset = B.m_reset = C.m_reset = D.m_reset = 0; - A.m_I.activate_hl(); - B.m_I.activate_hl(); - } + if (r) + { + A.m_reset = B.m_reset = C.m_reset = D.m_reset = 1; + A.m_I.inactivate(); + B.m_I.inactivate(); + OUTLOGIC(A.m_Q, 0, NLTIME_FROM_NS(40)); + OUTLOGIC(B.m_Q, 0, NLTIME_FROM_NS(40)); + OUTLOGIC(C.m_Q, 0, NLTIME_FROM_NS(40)); + OUTLOGIC(D.m_Q, 0, NLTIME_FROM_NS(40)); + } + else + { + A.m_reset = B.m_reset = C.m_reset = D.m_reset = 0; + A.m_I.activate_hl(); + B.m_I.activate_hl(); + } } diff --git a/src/emu/netlist/devices/nld_7493.h b/src/emu/netlist/devices/nld_7493.h index 7cd6e59988..cc961c389f 100644 --- a/src/emu/netlist/devices/nld_7493.h +++ b/src/emu/netlist/devices/nld_7493.h @@ -60,27 +60,27 @@ #include "../nl_base.h" #define TTL_7493(_name, _CLKA, _CLKB, _R1, _R2) \ - NET_REGISTER_DEV(7493, _name) \ - NET_CONNECT(_name, CLKA, _CLKA) \ - NET_CONNECT(_name, CLKB, _CLKB) \ - NET_CONNECT(_name, R1, _R1) \ - NET_CONNECT(_name, R2, _R2) + NET_REGISTER_DEV(7493, _name) \ + NET_CONNECT(_name, CLKA, _CLKA) \ + NET_CONNECT(_name, CLKB, _CLKB) \ + NET_CONNECT(_name, R1, _R1) \ + NET_CONNECT(_name, R2, _R2) NETLIB_SUBDEVICE(7493ff, - netlist_ttl_input_t m_I; - netlist_ttl_output_t m_Q; + netlist_ttl_input_t m_I; + netlist_ttl_output_t m_Q; - UINT8 m_reset; + UINT8 m_reset; ); NETLIB_DEVICE(7493, - netlist_ttl_input_t m_R1; - netlist_ttl_input_t m_R2; + netlist_ttl_input_t m_R1; + netlist_ttl_input_t m_R2; - NETLIB_NAME(7493ff) A; - NETLIB_NAME(7493ff) B; - NETLIB_NAME(7493ff) C; - NETLIB_NAME(7493ff) D; + NETLIB_NAME(7493ff) A; + NETLIB_NAME(7493ff) B; + NETLIB_NAME(7493ff) C; + NETLIB_NAME(7493ff) D; ); #endif /* NLD_7493_H_ */ diff --git a/src/emu/netlist/devices/nld_9316.c b/src/emu/netlist/devices/nld_9316.c index ede8e0c0e6..b3b49c171b 100644 --- a/src/emu/netlist/devices/nld_9316.c +++ b/src/emu/netlist/devices/nld_9316.c @@ -7,148 +7,147 @@ NETLIB_START(9316) { - register_sub(sub, "sub"); + register_sub(sub, "sub"); - register_subalias("CLK", sub.m_clk); + 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_input("ENP", m_ENP); + register_input("ENT", m_ENT); + register_input("CLRQ", m_CLRQ); + register_input("LOADQ", m_LOADQ); - register_subalias("A", sub.m_A); - register_subalias("B", sub.m_B); - register_subalias("C", sub.m_C); - register_subalias("D", sub.m_D); + register_subalias("A", sub.m_A); + register_subalias("B", sub.m_B); + register_subalias("C", sub.m_C); + register_subalias("D", sub.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); + 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_START(9316_sub) { - m_cnt = 0; - m_loadq = 1; - m_ent = 1; + m_cnt = 0; + m_loadq = 1; + m_ent = 1; - register_input("CLK", m_clk, netlist_input_t::STATE_INP_LH); + register_input("CLK", m_clk, netlist_input_t::STATE_INP_LH); - register_input("A", m_A, netlist_input_t::STATE_INP_PASSIVE); - register_input("B", m_B, netlist_input_t::STATE_INP_PASSIVE); - register_input("C", m_C, netlist_input_t::STATE_INP_PASSIVE); - register_input("D", m_D, netlist_input_t::STATE_INP_PASSIVE); + register_input("A", m_A, netlist_input_t::STATE_INP_PASSIVE); + register_input("B", m_B, netlist_input_t::STATE_INP_PASSIVE); + register_input("C", m_C, netlist_input_t::STATE_INP_PASSIVE); + register_input("D", m_D, netlist_input_t::STATE_INP_PASSIVE); - 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); + 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(NAME(m_cnt)); - save(NAME(m_loadq)); - save(NAME(m_ent)); + save(NAME(m_cnt)); + save(NAME(m_loadq)); + save(NAME(m_ent)); } NETLIB_UPDATE(9316_sub) { - UINT8 cnt = m_cnt; - if (m_loadq) - { - cnt = ( cnt + 1) & 0x0f; - update_outputs(cnt); - if (cnt == 0x0f) - OUTLOGIC(m_RC, m_ent, NLTIME_FROM_NS(20)); - else if (cnt == 0) - OUTLOGIC(m_RC, 0, NLTIME_FROM_NS(20)); - } - else - { - cnt = (INPLOGIC_PASSIVE(m_D) << 3) | (INPLOGIC_PASSIVE(m_C) << 2) | (INPLOGIC_PASSIVE(m_B) << 1) | (INPLOGIC_PASSIVE(m_A) << 0); - update_outputs_all(cnt); - OUTLOGIC(m_RC, m_ent & (cnt == 0x0f), NLTIME_FROM_NS(20)); - } - m_cnt = cnt; + UINT8 cnt = m_cnt; + if (m_loadq) + { + cnt = ( cnt + 1) & 0x0f; + update_outputs(cnt); + if (cnt == 0x0f) + OUTLOGIC(m_RC, m_ent, NLTIME_FROM_NS(20)); + else if (cnt == 0) + OUTLOGIC(m_RC, 0, NLTIME_FROM_NS(20)); + } + else + { + cnt = (INPLOGIC_PASSIVE(m_D) << 3) | (INPLOGIC_PASSIVE(m_C) << 2) | (INPLOGIC_PASSIVE(m_B) << 1) | (INPLOGIC_PASSIVE(m_A) << 0); + update_outputs_all(cnt); + OUTLOGIC(m_RC, m_ent & (cnt == 0x0f), NLTIME_FROM_NS(20)); + } + m_cnt = cnt; } NETLIB_UPDATE(9316) { - sub.m_loadq = INPLOGIC(m_LOADQ); - sub.m_ent = INPLOGIC(m_ENT); - const netlist_sig_t clrq = INPLOGIC(m_CLRQ); + 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 - { - sub.m_clk.inactivate(); - if (!clrq & (sub.m_cnt>0)) - { - sub.m_cnt = 0; - sub.update_outputs(sub.m_cnt); - OUTLOGIC(sub.m_RC, 0, NLTIME_FROM_NS(20)); - return; - } - } - OUTLOGIC(sub.m_RC, sub.m_ent & (sub.m_cnt == 0x0f), NLTIME_FROM_NS(20)); + if ((!sub.m_loadq || (sub.m_ent & INPLOGIC(m_ENP))) & clrq) + { + sub.m_clk.activate_lh(); + } + else + { + sub.m_clk.inactivate(); + if (!clrq & (sub.m_cnt>0)) + { + sub.m_cnt = 0; + sub.update_outputs(sub.m_cnt); + OUTLOGIC(sub.m_RC, 0, NLTIME_FROM_NS(20)); + return; + } + } + 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)) { - 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); + 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(9316_sub, update_outputs, (const UINT8 cnt)) { - const netlist_time out_delay = NLTIME_FROM_NS(20); + 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); - OUTLOGIC(m_QB, (cnt >> 1) & 1, out_delay); - OUTLOGIC(m_QC, (cnt >> 2) & 1, out_delay); - OUTLOGIC(m_QD, (cnt >> 3) & 1, out_delay); + 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; - } + 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 } - diff --git a/src/emu/netlist/devices/nld_9316.h b/src/emu/netlist/devices/nld_9316.h index 886ef1c956..7aa340a76d 100644 --- a/src/emu/netlist/devices/nld_9316.h +++ b/src/emu/netlist/devices/nld_9316.h @@ -52,45 +52,45 @@ #include "../nl_base.h" #define TTL_9316(_name, _CLK, _ENP, _ENT, _CLRQ, _LOADQ, _A, _B, _C, _D) \ - NET_REGISTER_DEV(9316, _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) + NET_REGISTER_DEV(9316, _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) NETLIB_SUBDEVICE(9316_sub, - ATTR_HOT void update_outputs_all(const UINT8 cnt); - ATTR_HOT void update_outputs(const UINT8 cnt); + ATTR_HOT void update_outputs_all(const UINT8 cnt); + ATTR_HOT void update_outputs(const UINT8 cnt); - netlist_ttl_input_t m_clk; + netlist_ttl_input_t m_clk; - 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_A; + netlist_ttl_input_t m_B; + netlist_ttl_input_t m_C; + netlist_ttl_input_t m_D; - UINT8 m_cnt; - netlist_sig_t m_loadq; - netlist_sig_t m_ent; + UINT8 m_cnt; + netlist_sig_t m_loadq; + 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; + 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(9316, - NETLIB_NAME(9316_sub) sub; - 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_NAME(9316_sub) sub; + netlist_ttl_input_t m_ENP; + netlist_ttl_input_t m_ENT; + netlist_ttl_input_t m_CLRQ; + netlist_ttl_input_t m_LOADQ; ); #endif /* NLD_9316_H_ */ diff --git a/src/emu/netlist/devices/nld_legacy.c b/src/emu/netlist/devices/nld_legacy.c index 4afe74a45d..e23c7287ea 100644 --- a/src/emu/netlist/devices/nld_legacy.c +++ b/src/emu/netlist/devices/nld_legacy.c @@ -7,141 +7,141 @@ NETLIB_START(nicMultiSwitch) { - static const char *sIN[8] = { "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8" }; - int i; + static const char *sIN[8] = { "i1", "i2", "i3", "i4", "i5", "i6", "i7", "i8" }; + int i; - m_position = 0; - m_low.initial(0); + m_position = 0; + m_low.initial(0); - for (i=0; i<8; i++) - { - register_input(sIN[i], m_I[i]); - m_low.net().register_con(m_I[i]); - //m_I[i].set_net(m_low.m_net); - } - register_param("POS", m_POS, 0); - register_output("Q", m_Q); + for (i=0; i<8; i++) + { + register_input(sIN[i], m_I[i]); + m_low.net().register_con(m_I[i]); + //m_I[i].set_net(m_low.m_net); + } + register_param("POS", m_POS, 0); + register_output("Q", m_Q); - save(NAME(m_position)); + save(NAME(m_position)); } NETLIB_UPDATE(nicMultiSwitch) { - assert(m_position<8); - OUTANALOG(m_Q, INPANALOG(m_I[m_position]), NLTIME_FROM_NS(1)); + assert(m_position<8); + OUTANALOG(m_Q, INPANALOG(m_I[m_position]), NLTIME_FROM_NS(1)); } NETLIB_UPDATE_PARAM(nicMultiSwitch) { - m_position = m_POS.Value(); - //update(); + m_position = m_POS.Value(); + //update(); } NETLIB_START(nicMixer8) { - static const char *sI[8] = { "I1", "I2", "I3", "I4", "I5", "I6", "I7", "I8" }; - static const char *sR[8] = { "R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8" }; - int i; + static const char *sI[8] = { "I1", "I2", "I3", "I4", "I5", "I6", "I7", "I8" }; + static const char *sR[8] = { "R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8" }; + int i; - m_low.initial(0); + m_low.initial(0); - for (i=0; i<8; i++) - { - register_input(sI[i], m_I[i]); - m_low.net().register_con(m_I[i]); - //m_I[i].set_output(m_low); - register_param(sR[i], m_R[i], 1e12); - } - register_output("Q", m_Q); + for (i=0; i<8; i++) + { + register_input(sI[i], m_I[i]); + m_low.net().register_con(m_I[i]); + //m_I[i].set_output(m_low); + register_param(sR[i], m_R[i], 1e12); + } + register_output("Q", m_Q); } NETLIB_UPDATE(nicMixer8) { - int i; - double r = 0; + int i; + double r = 0; - for (i=0; i<8; i++) - { - r += m_w[i] * INPANALOG(m_I[i]); - } - OUTANALOG(m_Q, r, NLTIME_IMMEDIATE); + for (i=0; i<8; i++) + { + r += m_w[i] * INPANALOG(m_I[i]); + } + OUTANALOG(m_Q, r, NLTIME_IMMEDIATE); } NETLIB_UPDATE_PARAM(nicMixer8) { - double t = 0; - int i; + double t = 0; + int i; - for (i=0; i<8; i++) - t += 1.0 / m_R[i].Value(); - t = 1.0 / t; + for (i=0; i<8; i++) + t += 1.0 / m_R[i].Value(); + t = 1.0 / t; - for (i=0; i<8; i++) - m_w[i] = t / m_R[i].Value(); + for (i=0; i<8; i++) + m_w[i] = t / m_R[i].Value(); } NETLIB_START(nicRSFF) { - register_input("S", m_S); - register_input("R", m_R); - register_output("Q", m_Q); - register_output("QQ", m_QQ); - m_Q.initial(0); - m_QQ.initial(1); + register_input("S", m_S); + register_input("R", m_R); + register_output("Q", m_Q); + register_output("QQ", m_QQ); + m_Q.initial(0); + m_QQ.initial(1); } NETLIB_UPDATE(nicRSFF) { - if (INPLOGIC(m_S)) - { - OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(10)); - OUTLOGIC(m_QQ, 0, NLTIME_FROM_NS(10)); - } - else if (INPLOGIC(m_R)) - { - OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(10)); - OUTLOGIC(m_QQ, 1, NLTIME_FROM_NS(10)); - } + if (INPLOGIC(m_S)) + { + OUTLOGIC(m_Q, 1, NLTIME_FROM_NS(10)); + OUTLOGIC(m_QQ, 0, NLTIME_FROM_NS(10)); + } + else if (INPLOGIC(m_R)) + { + OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(10)); + OUTLOGIC(m_QQ, 1, NLTIME_FROM_NS(10)); + } } NETLIB_START(nicNE555N_MSTABLE) { - register_input("TRIG", m_trigger); - register_input("CV", m_CV); + register_input("TRIG", m_trigger); + register_input("CV", m_CV); - register_output("Q", m_Q); - register_param("R", m_R, 0.0); - register_param("C", m_C, 0.0); - register_param("VS", m_VS, 5.0); - register_param("VL", m_VL, 0.0 *5.0); + register_output("Q", m_Q); + register_param("R", m_R, 0.0); + register_param("C", m_C, 0.0); + register_param("VS", m_VS, 5.0); + register_param("VL", m_VL, 0.0 *5.0); - m_THRESHOLD_OUT.init_object(*this, name() + "THRESHOLD"); - register_link_internal(m_THRESHOLD, m_THRESHOLD_OUT, netlist_input_t::STATE_INP_ACTIVE); + m_THRESHOLD_OUT.init_object(*this, name() + "THRESHOLD"); + register_link_internal(m_THRESHOLD, m_THRESHOLD_OUT, netlist_input_t::STATE_INP_ACTIVE); - m_Q.initial(5.0 * 0.4); - m_last = false; + m_Q.initial(5.0 * 0.4); + m_last = false; - save(NAME(m_last)); + save(NAME(m_last)); } inline double NETLIB_NAME(nicNE555N_MSTABLE)::nicNE555N_cv() { - return (m_CV.is_highz() ? 0.67 * m_VS.Value() : INPANALOG(m_CV)); + return (m_CV.is_highz() ? 0.67 * m_VS.Value() : INPANALOG(m_CV)); } inline double NETLIB_NAME(nicNE555N_MSTABLE)::nicNE555N_clamp(const double v, const double a, const double b) { - double ret = v; - if (ret > m_VS.Value() - a) - ret = m_VS.Value() - a; - if (ret < b) - ret = b; - return ret; + double ret = v; + if (ret > m_VS.Value() - a) + ret = m_VS.Value() - a; + if (ret < b) + ret = b; + return ret; } NETLIB_UPDATE_PARAM(nicNE555N_MSTABLE) @@ -150,46 +150,46 @@ NETLIB_UPDATE_PARAM(nicNE555N_MSTABLE) NETLIB_UPDATE(nicNE555N_MSTABLE) { - update_param(); // FIXME : m_CV should be on a sub device ... + update_param(); // FIXME : m_CV should be on a sub device ... - double vt = nicNE555N_clamp(nicNE555N_cv(), 0.7, 1.4); - bool bthresh = (INPANALOG(m_THRESHOLD) > vt); - bool btrig = (INPANALOG(m_trigger) > nicNE555N_clamp(nicNE555N_cv() * 0.5, 0.7, 1.4)); - bool out = m_last; + double vt = nicNE555N_clamp(nicNE555N_cv(), 0.7, 1.4); + bool bthresh = (INPANALOG(m_THRESHOLD) > vt); + bool btrig = (INPANALOG(m_trigger) > nicNE555N_clamp(nicNE555N_cv() * 0.5, 0.7, 1.4)); + bool out = m_last; - if (!btrig) - { - out = true; - } - else if (bthresh) - { - out = false; - } + if (!btrig) + { + out = true; + } + else if (bthresh) + { + out = false; + } - if (!m_last && out) - { - double vl = m_VL.Value(); - double time; + if (!m_last && out) + { + double vl = m_VL.Value(); + double time; - // FIXME : m_CV should be on a sub device ... + // FIXME : m_CV should be on a sub device ... - // TI datasheet states minimum pulse of 10 us - if (vt vcc - a) - ret = vcc - a; - if (ret < b) - ret = b; - return ret; + if (ret > vcc - a) + ret = vcc - a; + if (ret < b) + ret = b; + return ret; } NETLIB_START(NE555) { + register_sub(m_R1, "R1"); + register_sub(m_R2, "R2"); + register_sub(m_R3, "R3"); + register_sub(m_RDIS, "RDIS"); - register_sub(m_R1, "R1"); - register_sub(m_R2, "R2"); - register_sub(m_R3, "R3"); - register_sub(m_RDIS, "RDIS"); + register_subalias("GND", m_R3.m_N); // Pin 1 + register_input("TRIG", m_TRIG); // Pin 2 + register_output("OUT", m_OUT); // Pin 3 + register_input("RESET", m_RESET); // Pin 4 + register_subalias("CONT", m_R1.m_N); // Pin 5 + register_input("THRESH", m_THRES); // Pin 6 + register_subalias("DISCH", m_RDIS.m_P); // Pin 7 + register_subalias("VCC", m_R1.m_P); // Pin 8 - register_subalias("GND", m_R3.m_N); // Pin 1 - register_input("TRIG", m_TRIG); // Pin 2 - register_output("OUT", m_OUT); // Pin 3 - register_input("RESET", m_RESET); // Pin 4 - register_subalias("CONT", m_R1.m_N); // Pin 5 - register_input("THRESH", m_THRES); // Pin 6 - register_subalias("DISCH", m_RDIS.m_P); // Pin 7 - register_subalias("VCC", m_R1.m_P); // Pin 8 + m_R1.set_R(5000); + m_R2.set_R(5000); + m_R3.set_R(5000); + m_RDIS.set_R(R_OFF); - m_R1.set_R(5000); - m_R2.set_R(5000); - m_R3.set_R(5000); - m_RDIS.set_R(R_OFF); + setup().connect(m_R1.m_N, m_R2.m_P); + setup().connect(m_R2.m_N, m_R3.m_P); + setup().connect(m_RDIS.m_N, m_R3.m_N); - setup().connect(m_R1.m_N, m_R2.m_P); - setup().connect(m_R2.m_N, m_R3.m_P); - setup().connect(m_RDIS.m_N, m_R3.m_N); + m_last_out = false; - m_last_out = false; - - save(NAME(m_last_out)); + save(NAME(m_last_out)); } NETLIB_UPDATE(NE555) { - // FIXME: assumes GND is connected to 0V. + // FIXME: assumes GND is connected to 0V. - 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; + 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; - } - else if (bthresh) - { - out = false; - } + if (!btrig) + { + out = true; + } + else if (bthresh) + { + out = false; + } - if (!m_last_out && out) - { - OUTANALOG(m_OUT, TERMANALOG(m_R1.m_P), NLTIME_FROM_NS(100)); - m_RDIS.set_R(R_OFF); - } - else if (m_last_out && !out) - { - OUTANALOG(m_OUT, TERMANALOG(m_R3.m_N), NLTIME_FROM_NS(100)); - m_RDIS.set_R(R_ON); - } - m_last_out = out; + if (!m_last_out && out) + { + OUTANALOG(m_OUT, TERMANALOG(m_R1.m_P), NLTIME_FROM_NS(100)); + m_RDIS.set_R(R_OFF); + } + else if (m_last_out && !out) + { + OUTANALOG(m_OUT, TERMANALOG(m_R3.m_N), NLTIME_FROM_NS(100)); + m_RDIS.set_R(R_ON); + } + m_last_out = out; } diff --git a/src/emu/netlist/devices/nld_ne555.h b/src/emu/netlist/devices/nld_ne555.h index a350a684c2..487e8d3378 100644 --- a/src/emu/netlist/devices/nld_ne555.h +++ b/src/emu/netlist/devices/nld_ne555.h @@ -23,22 +23,21 @@ #include "nld_twoterm.h" #define NETDEV_NE555(_name) \ - NET_REGISTER_DEV(NE555, _name) \ - + NET_REGISTER_DEV(NE555, _name) NETLIB_DEVICE(NE555, - NETLIB_NAME(R) m_R1; - NETLIB_NAME(R) m_R2; - NETLIB_NAME(R) m_R3; - NETLIB_NAME(R) m_RDIS; + NETLIB_NAME(R) m_R1; + NETLIB_NAME(R) m_R2; + NETLIB_NAME(R) m_R3; + NETLIB_NAME(R) m_RDIS; - netlist_logic_input_t m_RESET; - netlist_analog_input_t m_THRES; - netlist_analog_input_t m_TRIG; - netlist_analog_output_t m_OUT; + netlist_logic_input_t m_RESET; + netlist_analog_input_t m_THRES; + netlist_analog_input_t m_TRIG; + netlist_analog_output_t m_OUT; - bool m_last_out; + bool m_last_out; - double clamp(const double v, const double a, const double b); + double clamp(const double v, const double a, const double b); ); diff --git a/src/emu/netlist/devices/nld_signal.h b/src/emu/netlist/devices/nld_signal.h index a9e99ec381..e54eaac737 100644 --- a/src/emu/netlist/devices/nld_signal.h +++ b/src/emu/netlist/devices/nld_signal.h @@ -93,7 +93,7 @@ public: { register_input(sIN[i], m_i[i]); } - save(NAME(m_active)); + save(NAME(m_active)); } #if (USE_DEACTIVE_DEVICE) @@ -167,7 +167,7 @@ public: { register_input(sIN[i], m_i[i], netlist_input_t::STATE_INP_ACTIVE); } - save(NAME(m_active)); + save(NAME(m_active)); } #if (USE_DEACTIVE_DEVICE) diff --git a/src/emu/netlist/devices/nld_solver.c b/src/emu/netlist/devices/nld_solver.c index b02f5e4d70..7c8ed65d0e 100644 --- a/src/emu/netlist/devices/nld_solver.c +++ b/src/emu/netlist/devices/nld_solver.c @@ -15,155 +15,155 @@ ATTR_COLD void netlist_matrix_solver_t::setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &aowner) { - m_owner = &aowner; - for (netlist_net_t::list_t::entry_t *pn = nets.first(); pn != NULL; pn = nets.next(pn)) - { - NL_VERBOSE_OUT(("setting up net\n")); + m_owner = &aowner; + for (netlist_net_t::list_t::entry_t *pn = nets.first(); pn != NULL; pn = nets.next(pn)) + { + NL_VERBOSE_OUT(("setting up net\n")); - m_nets.add(pn->object()); - pn->object()->m_solver = this; + m_nets.add(pn->object()); + pn->object()->m_solver = this; - for (netlist_core_terminal_t *p = pn->object()->m_head; p != NULL; p = p->m_update_list_next) - { - switch (p->type()) - { - case netlist_terminal_t::TERMINAL: - switch (p->netdev().family()) - { - case netlist_device_t::CAPACITOR: - if (!m_steps.contains(&p->netdev())) - m_steps.add(&p->netdev()); - break; - case netlist_device_t::DIODE: - //case netlist_device_t::VCVS: - //case netlist_device_t::BJT_SWITCH: - if (!m_dynamic.contains(&p->netdev())) - m_dynamic.add(&p->netdev()); - break; - default: - break; - } - pn->object()->m_terms.add(static_cast(p)); - NL_VERBOSE_OUT(("Added terminal\n")); - break; - case netlist_terminal_t::INPUT: - if (!m_inps.contains(&p->netdev())) - m_inps.add(&p->netdev()); - NL_VERBOSE_OUT(("Added input\n")); - break; - default: - owner().netlist().xfatalerror("unhandled element found\n"); - break; - } - } - } + for (netlist_core_terminal_t *p = pn->object()->m_head; p != NULL; p = p->m_update_list_next) + { + switch (p->type()) + { + case netlist_terminal_t::TERMINAL: + switch (p->netdev().family()) + { + case netlist_device_t::CAPACITOR: + if (!m_steps.contains(&p->netdev())) + m_steps.add(&p->netdev()); + break; + case netlist_device_t::DIODE: + //case netlist_device_t::VCVS: + //case netlist_device_t::BJT_SWITCH: + if (!m_dynamic.contains(&p->netdev())) + m_dynamic.add(&p->netdev()); + break; + default: + break; + } + pn->object()->m_terms.add(static_cast(p)); + NL_VERBOSE_OUT(("Added terminal\n")); + break; + case netlist_terminal_t::INPUT: + if (!m_inps.contains(&p->netdev())) + m_inps.add(&p->netdev()); + NL_VERBOSE_OUT(("Added input\n")); + break; + default: + owner().netlist().xfatalerror("unhandled element found\n"); + break; + } + } + } } ATTR_HOT inline void netlist_matrix_solver_t::step(const netlist_time delta) { - const double dd = delta.as_double(); - for (dev_list_t::entry_t *p = m_steps.first(); p != NULL; p = m_steps.next(p)) - p->object()->step_time(dd); + const double dd = delta.as_double(); + for (dev_list_t::entry_t *p = m_steps.first(); p != NULL; p = m_steps.next(p)) + p->object()->step_time(dd); } ATTR_HOT inline void netlist_matrix_solver_t::update_inputs() { - for (dev_list_t::entry_t *p = m_inps.first(); p != NULL; p = m_inps.next(p)) - p->object()->update_dev(); + for (dev_list_t::entry_t *p = m_inps.first(); p != NULL; p = m_inps.next(p)) + p->object()->update_dev(); } ATTR_HOT inline bool netlist_matrix_solver_t::solve() { - bool resched = false; + bool resched = false; - /* update all non-linear devices */ - for (dev_list_t::entry_t *p = m_dynamic.first(); p != NULL; p = m_dynamic.next(p)) - switch (p->object()->family()) - { - case netlist_device_t::DIODE: - static_cast(p->object())->update_terminals(); - break; - default: - p->object()->update_terminals(); - break; - } + /* update all non-linear devices */ + for (dev_list_t::entry_t *p = m_dynamic.first(); p != NULL; p = m_dynamic.next(p)) + switch (p->object()->family()) + { + case netlist_device_t::DIODE: + static_cast(p->object())->update_terminals(); + break; + default: + p->object()->update_terminals(); + break; + } - for (netlist_net_t::list_t::entry_t *pn = m_nets.first(); pn != NULL; pn = m_nets.next(pn)) - { - netlist_net_t *net = pn->object(); + for (netlist_net_t::list_t::entry_t *pn = m_nets.first(); pn != NULL; pn = m_nets.next(pn)) + { + netlist_net_t *net = pn->object(); - double gtot = 0; - double gabs = 0; - double iIdr = 0; - const netlist_net_t::terminal_list_t &terms = net->m_terms; + double gtot = 0; + double gabs = 0; + double iIdr = 0; + const netlist_net_t::terminal_list_t &terms = net->m_terms; #if 1 - switch (terms.count()) - { - case 1: - { - const netlist_terminal_t *pt = terms.first()->object(); - gtot = pt->m_gt; - gabs = fabs(pt->m_go); - iIdr = pt->m_Idr + pt->m_go * pt->m_otherterm->net().Q_Analog(); - } - break; - case 2: - { - const netlist_terminal_t *pt1 = terms[0]; - const netlist_terminal_t *pt2 = terms[1]; - gtot = pt1->m_gt + pt2->m_gt; - gabs = fabs(pt1->m_go) + fabs(pt2->m_go); - iIdr = pt1->m_Idr + pt1->m_go * pt1->m_otherterm->net().Q_Analog() - + pt2->m_Idr + pt2->m_go * pt2->m_otherterm->net().Q_Analog(); - } - break; - case 3: - { - const netlist_terminal_t *pt1 = terms[0]; - const netlist_terminal_t *pt2 = terms[1]; - const netlist_terminal_t *pt3 = terms[2]; - gtot = pt1->m_gt + pt2->m_gt + pt3->m_gt; - gabs = fabs(pt1->m_go) + fabs(pt2->m_go) + fabs(pt3->m_go); - iIdr = pt1->m_Idr + pt1->m_go * pt1->m_otherterm->net().Q_Analog() - + pt2->m_Idr + pt2->m_go * pt2->m_otherterm->net().Q_Analog() - + pt3->m_Idr + pt3->m_go * pt3->m_otherterm->net().Q_Analog(); - } - break; - default: - for (netlist_net_t::terminal_list_t::entry_t *e = terms.first(); e != NULL; e = terms.next(e)) - { - netlist_terminal_t *pt = e->object(); - gtot += pt->m_gt; - gabs += fabs(pt->m_go); - iIdr += pt->m_Idr + pt->m_go * pt->m_otherterm->net().Q_Analog(); - } - break; - } + switch (terms.count()) + { + case 1: + { + const netlist_terminal_t *pt = terms.first()->object(); + gtot = pt->m_gt; + gabs = fabs(pt->m_go); + iIdr = pt->m_Idr + pt->m_go * pt->m_otherterm->net().Q_Analog(); + } + break; + case 2: + { + const netlist_terminal_t *pt1 = terms[0]; + const netlist_terminal_t *pt2 = terms[1]; + gtot = pt1->m_gt + pt2->m_gt; + gabs = fabs(pt1->m_go) + fabs(pt2->m_go); + iIdr = pt1->m_Idr + pt1->m_go * pt1->m_otherterm->net().Q_Analog() + + pt2->m_Idr + pt2->m_go * pt2->m_otherterm->net().Q_Analog(); + } + break; + case 3: + { + const netlist_terminal_t *pt1 = terms[0]; + const netlist_terminal_t *pt2 = terms[1]; + const netlist_terminal_t *pt3 = terms[2]; + gtot = pt1->m_gt + pt2->m_gt + pt3->m_gt; + gabs = fabs(pt1->m_go) + fabs(pt2->m_go) + fabs(pt3->m_go); + iIdr = pt1->m_Idr + pt1->m_go * pt1->m_otherterm->net().Q_Analog() + + pt2->m_Idr + pt2->m_go * pt2->m_otherterm->net().Q_Analog() + + pt3->m_Idr + pt3->m_go * pt3->m_otherterm->net().Q_Analog(); + } + break; + default: + for (netlist_net_t::terminal_list_t::entry_t *e = terms.first(); e != NULL; e = terms.next(e)) + { + netlist_terminal_t *pt = e->object(); + gtot += pt->m_gt; + gabs += fabs(pt->m_go); + iIdr += pt->m_Idr + pt->m_go * pt->m_otherterm->net().Q_Analog(); + } + break; + } #else - for (netlist_net_t::terminal_list_t::entry_t *e = terms.first(); e != NULL; e = terms.next(e)) - { - netlist_terminal_t *pt = e->object(); - gtot += pt->m_gt; - gabs += fabs(pt->m_go); - iIdr += pt->m_Idr + pt->m_go * pt->m_otherterm->net().Q_Analog(); - } + for (netlist_net_t::terminal_list_t::entry_t *e = terms.first(); e != NULL; e = terms.next(e)) + { + netlist_terminal_t *pt = e->object(); + gtot += pt->m_gt; + gabs += fabs(pt->m_go); + iIdr += pt->m_Idr + pt->m_go * pt->m_otherterm->net().Q_Analog(); + } #endif - double new_val; - gabs *= m_convergence_factor; - if (gabs > gtot) - new_val = (net->m_cur.Analog * gabs + iIdr) / (gtot + gabs); - else - new_val = iIdr / gtot; + double new_val; + gabs *= m_convergence_factor; + if (gabs > gtot) + new_val = (net->m_cur.Analog * gabs + iIdr) / (gtot + gabs); + else + new_val = iIdr / gtot; - if (fabs(new_val - net->m_cur.Analog) > m_accuracy) - resched = true; - net->m_cur.Analog = net->m_new.Analog = new_val; + if (fabs(new_val - net->m_cur.Analog) > m_accuracy) + resched = true; + net->m_cur.Analog = net->m_new.Analog = new_val; - NL_VERBOSE_OUT(("Info: %d\n", pn->object()->m_num_cons)); - //NL_VERBOSE_OUT(("New: %lld %f %f\n", netlist().time().as_raw(), netlist().time().as_double(), new_val)); - } - return resched; + NL_VERBOSE_OUT(("Info: %d\n", pn->object()->m_num_cons)); + //NL_VERBOSE_OUT(("New: %lld %f %f\n", netlist().time().as_raw(), netlist().time().as_double(), new_val)); + } + return resched; } // ---------------------------------------------------------------------------------------- @@ -174,160 +174,159 @@ typedef netlist_net_t::list_t *net_groups_t; static bool already_processed(net_groups_t groups, int &cur_group, netlist_net_t *net) { - if (net->isRailNet()) - return true; - for (int i = 0; i <= cur_group; i++) - { - if (groups[i].contains(net)) - return true; - } - return false; + if (net->isRailNet()) + return true; + for (int i = 0; i <= cur_group; i++) + { + if (groups[i].contains(net)) + return true; + } + return false; } static void process_net(net_groups_t groups, int &cur_group, netlist_net_t *net) { - /* add the net */ - if (net->m_head == NULL) - return; - groups[cur_group].add(net); - for (netlist_core_terminal_t *p = net->m_head; p != NULL; p = p->m_update_list_next) - { - if (p->isType(netlist_terminal_t::TERMINAL)) - { - netlist_terminal_t *pt = static_cast(p); - netlist_net_t *nnet = &pt->m_otherterm->net(); - if (!already_processed(groups, cur_group, nnet)) - process_net(groups, cur_group, nnet); - } - } + /* add the net */ + if (net->m_head == NULL) + return; + groups[cur_group].add(net); + for (netlist_core_terminal_t *p = net->m_head; p != NULL; p = p->m_update_list_next) + { + if (p->isType(netlist_terminal_t::TERMINAL)) + { + netlist_terminal_t *pt = static_cast(p); + netlist_net_t *nnet = &pt->m_otherterm->net(); + if (!already_processed(groups, cur_group, nnet)) + process_net(groups, cur_group, nnet); + } + } } NETLIB_START(solver) { - register_output("Q_sync", m_Q_sync); - register_output("Q_step", m_Q_step); - //register_input("FB", m_feedback); + register_output("Q_sync", m_Q_sync); + register_output("Q_step", m_Q_step); + //register_input("FB", m_feedback); - register_param("SYNC_DELAY", m_sync_delay, NLTIME_FROM_NS(10).as_double()); - m_nt_sync_delay = m_sync_delay.Value(); + register_param("SYNC_DELAY", m_sync_delay, NLTIME_FROM_NS(10).as_double()); + m_nt_sync_delay = m_sync_delay.Value(); - register_param("FREQ", m_freq, 48000.0); - m_inc = netlist_time::from_hz(m_freq.Value()); + register_param("FREQ", m_freq, 48000.0); + m_inc = netlist_time::from_hz(m_freq.Value()); - register_param("ACCURACY", m_accuracy, 1e-3); - register_param("CONVERG", m_convergence, 0.3); + register_param("ACCURACY", m_accuracy, 1e-3); + register_param("CONVERG", m_convergence, 0.3); - // internal staff + // internal staff - register_input("FB_sync", m_fb_sync, netlist_input_t::STATE_INP_ACTIVE); - register_input("FB_step", m_fb_step, netlist_input_t::STATE_INP_ACTIVE); + register_input("FB_sync", m_fb_sync, netlist_input_t::STATE_INP_ACTIVE); + register_input("FB_step", m_fb_step, netlist_input_t::STATE_INP_ACTIVE); - setup().connect(m_fb_sync, m_Q_sync); - setup().connect(m_fb_step, m_Q_step); + setup().connect(m_fb_sync, m_Q_sync); + setup().connect(m_fb_step, m_Q_step); - m_last_step = netlist_time::zero; + m_last_step = netlist_time::zero; - save(NAME(m_last_step)); + save(NAME(m_last_step)); } NETLIB_UPDATE_PARAM(solver) { - m_inc = netlist_time::from_hz(m_freq.Value()); + m_inc = netlist_time::from_hz(m_freq.Value()); } NETLIB_NAME(solver)::~NETLIB_NAME(solver)() { - netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); - while (e != NULL) - { - netlist_matrix_solver_t::list_t::entry_t *en = m_mat_solvers.next(e); - delete e->object(); - e = en; - } + netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); + while (e != NULL) + { + netlist_matrix_solver_t::list_t::entry_t *en = m_mat_solvers.next(e); + delete e->object(); + e = en; + } } NETLIB_FUNC_VOID(solver, post_start, ()) { - netlist_net_t::list_t groups[100]; - int cur_group = -1; + netlist_net_t::list_t groups[100]; + int cur_group = -1; - SOLVER_VERBOSE_OUT(("Scanning net groups ...\n")); - // determine net groups - for (netlist_net_t::list_t::entry_t *pn = netlist().m_nets.first(); pn != NULL; pn = netlist().m_nets.next(pn)) - { - if (!already_processed(groups, cur_group, pn->object())) - { - cur_group++; - process_net(groups, cur_group, pn->object()); - } - } + SOLVER_VERBOSE_OUT(("Scanning net groups ...\n")); + // determine net groups + for (netlist_net_t::list_t::entry_t *pn = netlist().m_nets.first(); pn != NULL; pn = netlist().m_nets.next(pn)) + { + if (!already_processed(groups, cur_group, pn->object())) + { + cur_group++; + process_net(groups, cur_group, pn->object()); + } + } - // setup the solvers - SOLVER_VERBOSE_OUT(("Found %d net groups in %d nets\n", cur_group + 1, m_nets.count())); - for (int i = 0; i <= cur_group; i++) - { - netlist_matrix_solver_t *ms = new netlist_matrix_solver_t(); - ms->m_accuracy = m_accuracy.Value(); - ms->m_convergence_factor = m_convergence.Value(); - ms->setup(groups[i], *this); - m_mat_solvers.add(ms); - SOLVER_VERBOSE_OUT(("%d ==> %d nets %s\n", i, groups[i].count(), groups[i].first()->object()->m_head->name().cstr())); - SOLVER_VERBOSE_OUT((" has %s elements\n", ms->is_dynamic() ? "dynamic" : "no dynamic")); - } + // setup the solvers + SOLVER_VERBOSE_OUT(("Found %d net groups in %d nets\n", cur_group + 1, m_nets.count())); + for (int i = 0; i <= cur_group; i++) + { + netlist_matrix_solver_t *ms = new netlist_matrix_solver_t(); + ms->m_accuracy = m_accuracy.Value(); + ms->m_convergence_factor = m_convergence.Value(); + ms->setup(groups[i], *this); + m_mat_solvers.add(ms); + SOLVER_VERBOSE_OUT(("%d ==> %d nets %s\n", i, groups[i].count(), groups[i].first()->object()->m_head->name().cstr())); + SOLVER_VERBOSE_OUT((" has %s elements\n", ms->is_dynamic() ? "dynamic" : "no dynamic")); + } } NETLIB_UPDATE(solver) { - //m_Q.setToNoCheck(!m_Q.new_Q(), m_inc ); - //OUTLOGIC(m_Q, !m_Q.net().new_Q(), m_inc ); + //m_Q.setToNoCheck(!m_Q.new_Q(), m_inc ); + //OUTLOGIC(m_Q, !m_Q.net().new_Q(), m_inc ); - bool resched = false; - int resched_cnt = 0; - netlist_time now = netlist().time(); - netlist_time delta = now - m_last_step; + bool resched = false; + int resched_cnt = 0; + netlist_time now = netlist().time(); + netlist_time delta = now - m_last_step; - if (delta >= m_inc) - { - NL_VERBOSE_OUT(("Step!\n")); - /* update all terminals for new time step */ - m_last_step = now; - for (netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); e != NULL; e = m_mat_solvers.next(e)) - { - e->object()->step(delta); - } - } - bool global_resched = false; - for (netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); e != NULL; e = m_mat_solvers.next(e)) - { - resched_cnt = (e->object()->is_dynamic() ? 0 : 1); - do { - resched = e->object()->solve(); - resched_cnt++; - } while ((resched && (resched_cnt < 5)) || (resched_cnt <= 1)); - global_resched = global_resched || resched; - } - //if (global_resched) - // printf("rescheduled\n"); - if (global_resched) - { - schedule(); - } - else - { - /* update all inputs connected */ - for (netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); e != NULL; e = m_mat_solvers.next(e)) - { - e->object()->update_inputs(); - } + if (delta >= m_inc) + { + NL_VERBOSE_OUT(("Step!\n")); + /* update all terminals for new time step */ + m_last_step = now; + for (netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); e != NULL; e = m_mat_solvers.next(e)) + { + e->object()->step(delta); + } + } + bool global_resched = false; + for (netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); e != NULL; e = m_mat_solvers.next(e)) + { + resched_cnt = (e->object()->is_dynamic() ? 0 : 1); + do { + resched = e->object()->solve(); + resched_cnt++; + } while ((resched && (resched_cnt < 5)) || (resched_cnt <= 1)); + global_resched = global_resched || resched; + } + //if (global_resched) + // printf("rescheduled\n"); + if (global_resched) + { + schedule(); + } + else + { + /* update all inputs connected */ + for (netlist_matrix_solver_t::list_t::entry_t *e = m_mat_solvers.first(); e != NULL; e = m_mat_solvers.next(e)) + { + e->object()->update_inputs(); + } - /* step circuit */ - if (!m_Q_step.net().is_queued()) - m_Q_step.net().push_to_queue(m_inc); - } + /* step circuit */ + if (!m_Q_step.net().is_queued()) + m_Q_step.net().push_to_queue(m_inc); + } } - diff --git a/src/emu/netlist/devices/nld_solver.h b/src/emu/netlist/devices/nld_solver.h index 55216f7014..0f9d0f54c2 100644 --- a/src/emu/netlist/devices/nld_solver.h +++ b/src/emu/netlist/devices/nld_solver.h @@ -14,7 +14,7 @@ // ---------------------------------------------------------------------------------------- #define NETDEV_SOLVER(_name) \ - NET_REGISTER_DEV(solver, _name) + NET_REGISTER_DEV(solver, _name) // ---------------------------------------------------------------------------------------- // solver @@ -25,70 +25,70 @@ class NETLIB_NAME(solver); class netlist_matrix_solver_t { public: - typedef netlist_list_t list_t; - typedef netlist_core_device_t::list_t dev_list_t; + typedef netlist_list_t list_t; + typedef netlist_core_device_t::list_t dev_list_t; - ATTR_COLD void setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner); + ATTR_COLD void setup(netlist_net_t::list_t &nets, NETLIB_NAME(solver) &owner); - // return true if a reschedule is needed ... - ATTR_HOT bool solve(); - ATTR_HOT void step(const netlist_time delta); - ATTR_HOT void update_inputs(); + // return true if a reschedule is needed ... + ATTR_HOT bool solve(); + ATTR_HOT void step(const netlist_time delta); + ATTR_HOT void update_inputs(); - ATTR_HOT inline bool is_dynamic() { return m_dynamic.count() > 0; } + ATTR_HOT inline bool is_dynamic() { return m_dynamic.count() > 0; } - inline const NETLIB_NAME(solver) &owner() const; + inline const NETLIB_NAME(solver) &owner() const; - double m_accuracy; - double m_convergence_factor; + double m_accuracy; + double m_convergence_factor; private: - netlist_net_t::list_t m_nets; - dev_list_t m_dynamic; - dev_list_t m_inps; - dev_list_t m_steps; + netlist_net_t::list_t m_nets; + dev_list_t m_dynamic; + dev_list_t m_inps; + dev_list_t m_steps; - NETLIB_NAME(solver) *m_owner; + NETLIB_NAME(solver) *m_owner; }; NETLIB_DEVICE_WITH_PARAMS(solver, - typedef netlist_core_device_t::list_t dev_list_t; + typedef netlist_core_device_t::list_t dev_list_t; - netlist_ttl_input_t m_fb_sync; - netlist_ttl_output_t m_Q_sync; + netlist_ttl_input_t m_fb_sync; + netlist_ttl_output_t m_Q_sync; - netlist_ttl_input_t m_fb_step; - netlist_ttl_output_t m_Q_step; + netlist_ttl_input_t m_fb_step; + netlist_ttl_output_t m_Q_step; - netlist_param_double_t m_freq; - netlist_param_double_t m_sync_delay; - netlist_param_double_t m_accuracy; - netlist_param_double_t m_convergence; + netlist_param_double_t m_freq; + netlist_param_double_t m_sync_delay; + netlist_param_double_t m_accuracy; + netlist_param_double_t m_convergence; - netlist_time m_inc; - netlist_time m_last_step; - netlist_time m_nt_sync_delay; + netlist_time m_inc; + netlist_time m_last_step; + netlist_time m_nt_sync_delay; - netlist_matrix_solver_t::list_t m_mat_solvers; + netlist_matrix_solver_t::list_t m_mat_solvers; public: - ~NETLIB_NAME(solver)(); + ~NETLIB_NAME(solver)(); - ATTR_HOT inline void schedule(); + ATTR_HOT inline void schedule(); - ATTR_COLD void post_start(); + ATTR_COLD void post_start(); ); inline void NETLIB_NAME(solver)::schedule() { - // FIXME: time should be parameter; - if (!m_Q_sync.net().is_queued()) - m_Q_sync.net().push_to_queue(m_nt_sync_delay); + // FIXME: time should be parameter; + if (!m_Q_sync.net().is_queued()) + m_Q_sync.net().push_to_queue(m_nt_sync_delay); } inline const NETLIB_NAME(solver) &netlist_matrix_solver_t::owner() const { - return *m_owner; + return *m_owner; } diff --git a/src/emu/netlist/devices/nld_system.c b/src/emu/netlist/devices/nld_system.c index f1ab75e9f8..33bef13608 100644 --- a/src/emu/netlist/devices/nld_system.c +++ b/src/emu/netlist/devices/nld_system.c @@ -12,8 +12,8 @@ NETLIB_START(ttl_const) { - register_output("Q", m_Q); - register_param("CONST", m_const, 0); + register_output("Q", m_Q); + register_param("CONST", m_const, 0); } NETLIB_UPDATE(ttl_const) @@ -22,13 +22,13 @@ NETLIB_UPDATE(ttl_const) NETLIB_UPDATE_PARAM(ttl_const) { - OUTLOGIC(m_Q, m_const.Value(), NLTIME_IMMEDIATE); + OUTLOGIC(m_Q, m_const.Value(), NLTIME_IMMEDIATE); } NETLIB_START(analog_const) { - register_output("Q", m_Q); - register_param("CONST", m_const, 0.0); + register_output("Q", m_Q); + register_param("CONST", m_const, 0.0); } NETLIB_UPDATE(analog_const) @@ -37,7 +37,7 @@ NETLIB_UPDATE(analog_const) NETLIB_UPDATE_PARAM(analog_const) { - m_Q.initial(m_const.Value()); + m_Q.initial(m_const.Value()); } // ---------------------------------------------------------------------------------------- @@ -46,24 +46,24 @@ NETLIB_UPDATE_PARAM(analog_const) NETLIB_START(clock) { - register_output("Q", m_Q); - //register_input("FB", m_feedback); + register_output("Q", m_Q); + //register_input("FB", m_feedback); - register_param("FREQ", m_freq, 7159000.0 * 5.0); - m_inc = netlist_time::from_hz(m_freq.Value()*2); + register_param("FREQ", m_freq, 7159000.0 * 5.0); + m_inc = netlist_time::from_hz(m_freq.Value()*2); - register_link_internal(m_feedback, m_Q, netlist_input_t::STATE_INP_ACTIVE); + register_link_internal(m_feedback, m_Q, netlist_input_t::STATE_INP_ACTIVE); } NETLIB_UPDATE_PARAM(clock) { - m_inc = netlist_time::from_hz(m_freq.Value()*2); + m_inc = netlist_time::from_hz(m_freq.Value()*2); } NETLIB_UPDATE(clock) { - OUTLOGIC(m_Q, !m_Q.net().new_Q(), m_inc ); + OUTLOGIC(m_Q, !m_Q.net().new_Q(), m_inc ); } // ---------------------------------------------------------------------------------------- @@ -72,7 +72,7 @@ NETLIB_UPDATE(clock) NETLIB_START(logic_input) { - register_output("Q", m_Q); + register_output("Q", m_Q); } NETLIB_UPDATE(logic_input) @@ -85,7 +85,7 @@ NETLIB_UPDATE(logic_input) NETLIB_START(analog_input) { - register_output("Q", m_Q); + register_output("Q", m_Q); } NETLIB_UPDATE(analog_input) diff --git a/src/emu/netlist/devices/nld_system.h b/src/emu/netlist/devices/nld_system.h index 0859d9cdde..323a10b419 100644 --- a/src/emu/netlist/devices/nld_system.h +++ b/src/emu/netlist/devices/nld_system.h @@ -25,16 +25,16 @@ NETDEV_PARAM(_name.CONST, _v) #define NETDEV_MAINCLOCK(_name) \ - NET_REGISTER_DEV(mainclock, _name) + NET_REGISTER_DEV(mainclock, _name) #define NETDEV_CLOCK(_name) \ - NET_REGISTER_DEV(clock, _name) + NET_REGISTER_DEV(clock, _name) #define NETDEV_LOGIC_INPUT(_name) \ - NET_REGISTER_DEV(logic_input, _name) + NET_REGISTER_DEV(logic_input, _name) #define NETDEV_ANALOG_INPUT(_name) \ - NET_REGISTER_DEV(analog_input, _name) + NET_REGISTER_DEV(analog_input, _name) // ---------------------------------------------------------------------------------------- // netdev_*_const @@ -56,7 +56,7 @@ NETLIB_DEVICE_WITH_PARAMS(analog_const, NETLIB_DEVICE_WITH_PARAMS(mainclock, public: - netlist_ttl_output_t m_Q; + netlist_ttl_output_t m_Q; netlist_param_double_t m_freq; netlist_time m_inc; @@ -69,11 +69,11 @@ public: // ---------------------------------------------------------------------------------------- NETLIB_DEVICE_WITH_PARAMS(clock, - netlist_ttl_input_t m_feedback; - netlist_ttl_output_t m_Q; + netlist_ttl_input_t m_feedback; + netlist_ttl_output_t m_Q; - netlist_param_double_t m_freq; - netlist_time m_inc; + netlist_param_double_t m_freq; + netlist_time m_inc; ); @@ -82,11 +82,11 @@ NETLIB_DEVICE_WITH_PARAMS(clock, // ---------------------------------------------------------------------------------------- NETLIB_DEVICE(logic_input, - netlist_ttl_output_t m_Q; + netlist_ttl_output_t m_Q; ); NETLIB_DEVICE(analog_input, - netlist_analog_output_t m_Q; + netlist_analog_output_t m_Q; ); diff --git a/src/emu/netlist/devices/nld_twoterm.c b/src/emu/netlist/devices/nld_twoterm.c index ddf7fc128c..67262ea0cd 100644 --- a/src/emu/netlist/devices/nld_twoterm.c +++ b/src/emu/netlist/devices/nld_twoterm.c @@ -12,10 +12,10 @@ // ---------------------------------------------------------------------------------------- ATTR_COLD NETLIB_NAME(twoterm)::NETLIB_NAME(twoterm)(const family_t afamily) : - netlist_device_t(afamily) + netlist_device_t(afamily) { - m_P.m_otherterm = &m_N; - m_N.m_otherterm = &m_P; + m_P.m_otherterm = &m_N; + m_N.m_otherterm = &m_P; } NETLIB_START(twoterm) @@ -24,8 +24,8 @@ NETLIB_START(twoterm) NETLIB_UPDATE(twoterm) { - /* only called if connected to a rail net ==> notify the solver to recalculate */ - netlist().solver()->schedule(); + /* only called if connected to a rail net ==> notify the solver to recalculate */ + netlist().solver()->schedule(); } // ---------------------------------------------------------------------------------------- @@ -34,29 +34,29 @@ NETLIB_UPDATE(twoterm) NETLIB_START(R_base) { - register_terminal("1", m_P); - register_terminal("2", m_N); + register_terminal("1", m_P); + register_terminal("2", m_N); } NETLIB_UPDATE(R_base) { - NETLIB_NAME(twoterm)::update(); + NETLIB_NAME(twoterm)::update(); } NETLIB_START(R) { - NETLIB_NAME(R_base)::start(); - register_param("R", m_R, 1.0 / NETLIST_GMIN); + NETLIB_NAME(R_base)::start(); + register_param("R", m_R, 1.0 / NETLIST_GMIN); } NETLIB_UPDATE(R) { - NETLIB_NAME(twoterm)::update(); + NETLIB_NAME(twoterm)::update(); } NETLIB_UPDATE_PARAM(R) { - set_R(m_R.Value()); + set_R(m_R.Value()); } // ---------------------------------------------------------------------------------------- @@ -65,30 +65,30 @@ NETLIB_UPDATE_PARAM(R) NETLIB_START(POT) { - register_sub(m_R1, "R1"); - register_sub(m_R2, "R2"); + register_sub(m_R1, "R1"); + register_sub(m_R2, "R2"); - register_subalias("1", m_R1.m_P); - register_subalias("2", m_R1.m_N); - register_subalias("3", m_R2.m_N); + register_subalias("1", m_R1.m_P); + register_subalias("2", m_R1.m_N); + register_subalias("3", m_R2.m_N); - setup().connect(m_R2.m_P, m_R1.m_N); + setup().connect(m_R2.m_P, m_R1.m_N); - register_param("R", m_R, 1.0 / NETLIST_GMIN); - register_param("DIAL", m_Dial, 0.5); + register_param("R", m_R, 1.0 / NETLIST_GMIN); + register_param("DIAL", m_Dial, 0.5); } NETLIB_UPDATE(POT) { - m_R1.update_dev(); - m_R2.update_dev(); + m_R1.update_dev(); + m_R2.update_dev(); } NETLIB_UPDATE_PARAM(POT) { - m_R1.set_R(MAX(m_R.Value() * m_Dial.Value(), NETLIST_GMIN)); - m_R2.set_R(MAX(m_R.Value() * (1.0 - m_Dial.Value()), NETLIST_GMIN)); + m_R1.set_R(MAX(m_R.Value() * m_Dial.Value(), NETLIST_GMIN)); + m_R2.set_R(MAX(m_R.Value() * (1.0 - m_Dial.Value()), NETLIST_GMIN)); } // ---------------------------------------------------------------------------------------- // nld_C @@ -96,21 +96,21 @@ NETLIB_UPDATE_PARAM(POT) NETLIB_START(C) { - register_terminal("1", m_P); - register_terminal("2", m_N); + register_terminal("1", m_P); + register_terminal("2", m_N); - register_param("C", m_C, 1e-6); + register_param("C", m_C, 1e-6); } NETLIB_UPDATE_PARAM(C) { - // set to some very small step time for now - step_time(1e-9); + // set to some very small step time for now + step_time(1e-9); } NETLIB_UPDATE(C) { - NETLIB_NAME(twoterm)::update(); + NETLIB_NAME(twoterm)::update(); } // ---------------------------------------------------------------------------------------- @@ -119,59 +119,59 @@ NETLIB_UPDATE(C) NETLIB_START(D) { - register_terminal("A", m_P); - register_terminal("K", m_N); - register_param("model", m_model, ""); + register_terminal("A", m_P); + register_terminal("K", m_N); + register_param("model", m_model, ""); - m_Vd = 0.7; + m_Vd = 0.7; - save(NAME(m_Vd)); + save(NAME(m_Vd)); } NETLIB_UPDATE_PARAM(D) { - m_Is = m_model.dValue("Is", 1e-15); - m_n = m_model.dValue("N", 1); + m_Is = m_model.dValue("Is", 1e-15); + m_n = m_model.dValue("N", 1); - m_Vt = 0.0258 * m_n; + m_Vt = 0.0258 * m_n; - m_Vcrit = m_Vt * log(m_Vt / m_Is / sqrt(2.0)); - m_VtInv = 1.0 / m_Vt; - NL_VERBOSE_OUT(("VCutoff: %f\n", m_Vcrit)); + m_Vcrit = m_Vt * log(m_Vt / m_Is / sqrt(2.0)); + m_VtInv = 1.0 / m_Vt; + NL_VERBOSE_OUT(("VCutoff: %f\n", m_Vcrit)); } NETLIB_UPDATE(D) { - NETLIB_NAME(twoterm)::update(); + NETLIB_NAME(twoterm)::update(); } class diode { public: - diode() : m_Is(1e-15), m_VT(0.0258), m_VT_inv(1.0 / m_VT) {} - diode(const double Is, const double n) - { - m_Is = Is; - m_VT = 0.0258 * n; - m_VT_inv = 1.0 / m_VT; - } - void set(const double Is, const double n) - { - m_Is = Is; - m_VT = 0.0258 * n; - m_VT_inv = 1.0 / m_VT; - } - double I(const double V) const { return m_Is * exp(V * m_VT_inv) - m_Is; } - double g(const double V) const { return m_Is * m_VT_inv * exp(V * m_VT_inv); } - double V(const double I) const { return log(1.0 + I / m_Is) * m_VT; } - double gI(const double I) const { return m_VT_inv * (I + m_Is); } + diode() : m_Is(1e-15), m_VT(0.0258), m_VT_inv(1.0 / m_VT) {} + diode(const double Is, const double n) + { + m_Is = Is; + m_VT = 0.0258 * n; + m_VT_inv = 1.0 / m_VT; + } + void set(const double Is, const double n) + { + m_Is = Is; + m_VT = 0.0258 * n; + m_VT_inv = 1.0 / m_VT; + } + double I(const double V) const { return m_Is * exp(V * m_VT_inv) - m_Is; } + double g(const double V) const { return m_Is * m_VT_inv * exp(V * m_VT_inv); } + double V(const double I) const { return log(1.0 + I / m_Is) * m_VT; } + double gI(const double I) const { return m_VT_inv * (I + m_Is); } private: - double m_Is; - double m_VT; - double m_VT_inv; + double m_Is; + double m_VT; + double m_VT_inv; }; // ---------------------------------------------------------------------------------------- @@ -180,61 +180,61 @@ private: NETLIB_START(Q) { - register_param("model", m_model, ""); + register_param("model", m_model, ""); } template NETLIB_START(QBJT_switch<_type>) { - NETLIB_NAME(Q)::start(); + NETLIB_NAME(Q)::start(); - register_sub(m_RB, "RB"); - register_sub(m_RC, "RC"); - register_input("BV", m_BV); - register_input("EV", m_EV); + register_sub(m_RB, "RB"); + register_sub(m_RC, "RC"); + register_input("BV", m_BV); + register_input("EV", m_EV); - register_subalias("B", m_RB.m_P); - register_subalias("E", m_RB.m_N); - register_subalias("C", m_RC.m_P); + register_subalias("B", m_RB.m_P); + register_subalias("E", m_RB.m_N); + register_subalias("C", m_RC.m_P); - setup().connect(m_RB.m_N, m_RC.m_N); - setup().connect(m_RB.m_P, m_BV); - setup().connect(m_RB.m_N, m_EV); + setup().connect(m_RB.m_N, m_RC.m_N); + setup().connect(m_RB.m_P, m_BV); + setup().connect(m_RB.m_N, m_EV); - save(NAME(m_state_on)); + save(NAME(m_state_on)); } NETLIB_UPDATE(Q) { - netlist().solver()->schedule(); + netlist().solver()->schedule(); } template NETLIB_UPDATE_PARAM(QBJT_switch<_type>) { - double IS = m_model.dValue("IS", 1e-15); - double BF = m_model.dValue("BF", 100); - double NF = m_model.dValue("NF", 1); - //double VJE = m_model.dValue("VJE", 0.75); + double IS = m_model.dValue("IS", 1e-15); + double BF = m_model.dValue("BF", 100); + double NF = m_model.dValue("NF", 1); + //double VJE = m_model.dValue("VJE", 0.75); - double alpha = BF / (1.0 + BF); + double alpha = BF / (1.0 + BF); - diode d(IS, NF); + diode d(IS, NF); - // Assume 5mA Collector current for switch operation + // Assume 5mA Collector current for switch operation - if (_type == BJT_NPN) - m_V = d.V(0.005 / alpha); - else - m_V = - d.V(0.005 / alpha); + if (_type == BJT_NPN) + m_V = d.V(0.005 / alpha); + else + m_V = - d.V(0.005 / alpha); - m_gB = d.gI(0.005 / alpha); - if (m_gB < NETLIST_GMIN) - m_gB = NETLIST_GMIN; - m_gC = BF * m_gB; // very rough estimate - //printf("%f %f \n", m_V, m_gB); - m_RB.set(NETLIST_GMIN, 0.0, 0.0); - m_RC.set(NETLIST_GMIN, 0.0, 0.0); + m_gB = d.gI(0.005 / alpha); + if (m_gB < NETLIST_GMIN) + m_gB = NETLIST_GMIN; + m_gC = BF * m_gB; // very rough estimate + //printf("%f %f \n", m_V, m_gB); + m_RB.set(NETLIST_GMIN, 0.0, 0.0); + m_RC.set(NETLIST_GMIN, 0.0, 0.0); } template NETLIB_START(QBJT_switch); @@ -248,40 +248,39 @@ template NETLIB_UPDATE_PARAM(QBJT_switch); NETLIB_START(VCCS) { - configure(1.0, NETLIST_GMIN); + configure(1.0, NETLIST_GMIN); } ATTR_COLD void NETLIB_NAME(VCCS)::configure(const double Gfac, const double GI) { + register_param("G", m_G, 1.0); - register_param("G", m_G, 1.0); + register_terminal("IP", m_IP); + register_terminal("IN", m_IN); + register_terminal("OP", m_OP); + register_terminal("ON", m_ON); - register_terminal("IP", m_IP); - register_terminal("IN", m_IN); - register_terminal("OP", m_OP); - register_terminal("ON", m_ON); + m_OP1.init_object(*this, name() + ".OP1", netlist_core_terminal_t::STATE_INP_ACTIVE); + m_ON1.init_object(*this, name() + ".ON1", netlist_core_terminal_t::STATE_INP_ACTIVE); - m_OP1.init_object(*this, name() + ".OP1", netlist_core_terminal_t::STATE_INP_ACTIVE); - m_ON1.init_object(*this, name() + ".ON1", netlist_core_terminal_t::STATE_INP_ACTIVE); + const double m_mult = m_G.Value() * Gfac; // 1.0 ==> 1V ==> 1A + m_IP.set(GI); + m_IP.m_otherterm = &m_IN; // <= this should be NULL and terminal be filtered out prior to solving... + m_IN.set(GI); + m_IN.m_otherterm = &m_IP; // <= this should be NULL and terminal be filtered out prior to solving... - const double m_mult = m_G.Value() * Gfac; // 1.0 ==> 1V ==> 1A - m_IP.set(GI); - m_IP.m_otherterm = &m_IN; // <= this should be NULL and terminal be filtered out prior to solving... - m_IN.set(GI); - m_IN.m_otherterm = &m_IP; // <= this should be NULL and terminal be filtered out prior to solving... + m_OP.set(m_mult, 0.0); + m_OP.m_otherterm = &m_IP; + m_OP1.set(-m_mult, 0.0); + m_OP1.m_otherterm = &m_IN; - m_OP.set(m_mult, 0.0); - m_OP.m_otherterm = &m_IP; - m_OP1.set(-m_mult, 0.0); - m_OP1.m_otherterm = &m_IN; + m_ON.set(-m_mult, 0.0); + m_ON.m_otherterm = &m_IP; + m_ON1.set(m_mult, 0.0); + m_ON1.m_otherterm = &m_IN; - m_ON.set(-m_mult, 0.0); - m_ON.m_otherterm = &m_IP; - m_ON1.set(m_mult, 0.0); - m_ON1.m_otherterm = &m_IN; - - setup().connect(m_OP, m_OP1); - setup().connect(m_ON, m_ON1); + setup().connect(m_OP, m_OP1); + setup().connect(m_ON, m_ON1); } NETLIB_UPDATE_PARAM(VCCS) @@ -290,8 +289,8 @@ NETLIB_UPDATE_PARAM(VCCS) NETLIB_UPDATE(VCCS) { - /* only called if connected to a rail net ==> notify the solver to recalculate */ - netlist().solver()->schedule(); + /* only called if connected to a rail net ==> notify the solver to recalculate */ + netlist().solver()->schedule(); } // ---------------------------------------------------------------------------------------- @@ -300,25 +299,24 @@ NETLIB_UPDATE(VCCS) NETLIB_START(VCVS) { - register_param("RO", m_RO, 1.0); + register_param("RO", m_RO, 1.0); - const double gRO = 1.0 / m_RO.Value(); + const double gRO = 1.0 / m_RO.Value(); - configure(gRO, NETLIST_GMIN); + configure(gRO, NETLIST_GMIN); - m_OP2.init_object(*this, "OP2", netlist_core_terminal_t::STATE_INP_ACTIVE); - m_ON2.init_object(*this, "ON2", netlist_core_terminal_t::STATE_INP_ACTIVE); + m_OP2.init_object(*this, "OP2", netlist_core_terminal_t::STATE_INP_ACTIVE); + m_ON2.init_object(*this, "ON2", netlist_core_terminal_t::STATE_INP_ACTIVE); - m_OP2.set(gRO); - m_ON2.set(gRO); - m_OP2.m_otherterm = &m_ON2; - m_ON2.m_otherterm = &m_OP2; + m_OP2.set(gRO); + m_ON2.set(gRO); + m_OP2.m_otherterm = &m_ON2; + m_ON2.m_otherterm = &m_OP2; - setup().connect(m_OP2, m_OP1); - setup().connect(m_ON2, m_ON1); + setup().connect(m_OP2, m_OP1); + setup().connect(m_ON2, m_ON1); } NETLIB_UPDATE_PARAM(VCVS) { } - diff --git a/src/emu/netlist/devices/nld_twoterm.h b/src/emu/netlist/devices/nld_twoterm.h index 49b6ca3c62..6ebebf3690 100644 --- a/src/emu/netlist/devices/nld_twoterm.h +++ b/src/emu/netlist/devices/nld_twoterm.h @@ -40,30 +40,30 @@ // ---------------------------------------------------------------------------------------- #define NETDEV_R(_name, _R) \ - NET_REGISTER_DEV(R, _name) \ - NETDEV_PARAMI(_name, R, _R) + NET_REGISTER_DEV(R, _name) \ + NETDEV_PARAMI(_name, R, _R) #define NETDEV_POT(_name, _R) \ - NET_REGISTER_DEV(POT, _name) \ - NETDEV_PARAMI(_name, R, _R) + NET_REGISTER_DEV(POT, _name) \ + NETDEV_PARAMI(_name, R, _R) #define NETDEV_C(_name, _C) \ - NET_REGISTER_DEV(C, _name) \ - NETDEV_PARAMI(_name, C, _C) + NET_REGISTER_DEV(C, _name) \ + NETDEV_PARAMI(_name, C, _C) /* Generic Diode */ #define NETDEV_D(_name, _model) \ - NET_REGISTER_DEV(D, _name) \ - NETDEV_PARAMI(_name, model, # _model) + NET_REGISTER_DEV(D, _name) \ + NETDEV_PARAMI(_name, model, # _model) #define NETDEV_QPNP(_name, _model) \ - NET_REGISTER_DEV(QPNP_switch, _name) \ - NETDEV_PARAMI(_name, model, # _model) + NET_REGISTER_DEV(QPNP_switch, _name) \ + NETDEV_PARAMI(_name, model, # _model) #define NETDEV_QNPN(_name, _model) \ - NET_REGISTER_DEV(QNPN_switch, _name) \ - NETDEV_PARAMI(_name, model, # _model) + NET_REGISTER_DEV(QNPN_switch, _name) \ + NETDEV_PARAMI(_name, model, # _model) // ---------------------------------------------------------------------------------------- // Implementation @@ -76,24 +76,24 @@ class NETLIB_NAME(twoterm) : public netlist_device_t { public: - ATTR_COLD NETLIB_NAME(twoterm)(const family_t afamily); + ATTR_COLD NETLIB_NAME(twoterm)(const family_t afamily); - netlist_terminal_t m_P; - netlist_terminal_t m_N; + netlist_terminal_t m_P; + netlist_terminal_t m_N; - virtual NETLIB_UPDATE_TERMINALS() - { - } + virtual NETLIB_UPDATE_TERMINALS() + { + } - ATTR_HOT inline void set(const double G, const double V, const double I) - { - m_P.m_go = m_N.m_go = m_P.m_gt = m_N.m_gt = G; - m_N.m_Idr = ( -V) * G + I; - m_P.m_Idr = ( V) * G - I; - } + ATTR_HOT inline void set(const double G, const double V, const double I) + { + m_P.m_go = m_N.m_go = m_P.m_gt = m_N.m_gt = G; + m_N.m_Idr = ( -V) * G + I; + m_P.m_Idr = ( V) * G - I; + } protected: - ATTR_COLD virtual void start(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_COLD virtual void start(); + ATTR_HOT ATTR_ALIGN void update(); private: }; @@ -105,17 +105,17 @@ private: class NETLIB_NAME(R_base) : public NETLIB_NAME(twoterm) { public: - ATTR_COLD NETLIB_NAME(R_base)() : NETLIB_NAME(twoterm)(RESISTOR) { } + ATTR_COLD NETLIB_NAME(R_base)() : NETLIB_NAME(twoterm)(RESISTOR) { } - inline void set_R(const double R) { set(1.0 / R, 0.0, 0.0); } + inline void set_R(const double R) { set(1.0 / R, 0.0, 0.0); } protected: - ATTR_COLD virtual void start(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_COLD virtual void start(); + ATTR_HOT ATTR_ALIGN void update(); }; NETLIB_DEVICE_WITH_PARAMS_DERIVED(R, R_base, - netlist_param_double_t m_R; + netlist_param_double_t m_R; ); // ---------------------------------------------------------------------------------------- @@ -123,11 +123,11 @@ NETLIB_DEVICE_WITH_PARAMS_DERIVED(R, R_base, // ---------------------------------------------------------------------------------------- NETLIB_DEVICE_WITH_PARAMS(POT, - NETLIB_NAME(R_base) m_R1; - NETLIB_NAME(R_base) m_R2; + NETLIB_NAME(R_base) m_R1; + NETLIB_NAME(R_base) m_R2; - netlist_param_double_t m_R; - netlist_param_double_t m_Dial; + netlist_param_double_t m_R; + netlist_param_double_t m_Dial; ); @@ -138,21 +138,21 @@ NETLIB_DEVICE_WITH_PARAMS(POT, class NETLIB_NAME(C) : public NETLIB_NAME(twoterm) { public: - ATTR_COLD NETLIB_NAME(C)() : NETLIB_NAME(twoterm)(CAPACITOR) { } + ATTR_COLD NETLIB_NAME(C)() : NETLIB_NAME(twoterm)(CAPACITOR) { } - ATTR_HOT void step_time(const double st) - { - double G = m_C.Value() / st; - double I = -G * (m_P.net().Q_Analog()- m_N.net().Q_Analog()); - set(G, 0.0, I); - } + ATTR_HOT void step_time(const double st) + { + double G = m_C.Value() / st; + double I = -G * (m_P.net().Q_Analog()- m_N.net().Q_Analog()); + set(G, 0.0, I); + } protected: - ATTR_COLD virtual void start(); - ATTR_COLD virtual void update_param(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_COLD virtual void start(); + ATTR_COLD virtual void update_param(); + ATTR_HOT ATTR_ALIGN void update(); - netlist_param_double_t m_C; + netlist_param_double_t m_C; }; @@ -167,87 +167,87 @@ protected: #if 0 inline double fastexp_h(const double x) { - static const double ln2r = 1.442695040888963387; - static const double ln2 = 0.693147180559945286; - //static const double c3 = 0.166666666666666667; + static const double ln2r = 1.442695040888963387; + static const double ln2 = 0.693147180559945286; + //static const double c3 = 0.166666666666666667; - const double y = x * ln2r; - const unsigned int t = y; - const double z = (x - ln2 * (double) t); - const double zz = z * z; - //const double zzz = zz * z; + const double y = x * ln2r; + const unsigned int t = y; + const double z = (x - ln2 * (double) t); + const double zz = z * z; + //const double zzz = zz * z; - return (double)(1 << t)*(1.0 + z + 0.5 * zz); // + c3*zzz; + return (double)(1 << t)*(1.0 + z + 0.5 * zz); // + c3*zzz; } inline double fastexp(const double x) { - if (x<0) - return 1.0 / fastexp_h(-x); - else - return fastexp_h(x); + if (x<0) + return 1.0 / fastexp_h(-x); + else + return fastexp_h(x); } #endif class NETLIB_NAME(D) : public NETLIB_NAME(twoterm) { public: - ATTR_COLD NETLIB_NAME(D)() : NETLIB_NAME(twoterm)(DIODE) { } + ATTR_COLD NETLIB_NAME(D)() : NETLIB_NAME(twoterm)(DIODE) { } - NETLIB_UPDATE_TERMINALS() - { - const double nVd = m_P.net().Q_Analog()- m_N.net().Q_Analog(); + NETLIB_UPDATE_TERMINALS() + { + const double nVd = m_P.net().Q_Analog()- m_N.net().Q_Analog(); - //FIXME: Optimize cutoff case + //FIXME: Optimize cutoff case - double Id; - double G; + double Id; + double G; - if (nVd < -5.0 * m_Vt) - { - m_Vd = nVd; - G = NETLIST_GMIN; - Id = - m_Is; - } - else if (nVd < m_Vcrit) - { - m_Vd = nVd; + if (nVd < -5.0 * m_Vt) + { + m_Vd = nVd; + G = NETLIST_GMIN; + Id = - m_Is; + } + else if (nVd < m_Vcrit) + { + m_Vd = nVd; - const double eVDVt = exp(m_Vd * m_VtInv); - Id = m_Is * (eVDVt - 1.0); - G = m_Is * m_VtInv * eVDVt; - } - else - { + const double eVDVt = exp(m_Vd * m_VtInv); + Id = m_Is * (eVDVt - 1.0); + G = m_Is * m_VtInv * eVDVt; + } + else + { #if defined(_MSC_VER) && _MSC_VER < 1800 - m_Vd = m_Vd + log((nVd - m_Vd) * m_VtInv + 1.0) * m_Vt; + m_Vd = m_Vd + log((nVd - m_Vd) * m_VtInv + 1.0) * m_Vt; #else - m_Vd = m_Vd + log1p((nVd - m_Vd) * m_VtInv) * m_Vt; + m_Vd = m_Vd + log1p((nVd - m_Vd) * m_VtInv) * m_Vt; #endif - const double eVDVt = exp(m_Vd * m_VtInv); - Id = m_Is * (eVDVt - 1.0); + const double eVDVt = exp(m_Vd * m_VtInv); + Id = m_Is * (eVDVt - 1.0); - G = m_Is * m_VtInv * eVDVt; - } + G = m_Is * m_VtInv * eVDVt; + } - double I = (Id - m_Vd * G); - set(G, 0.0, I); - } + double I = (Id - m_Vd * G); + set(G, 0.0, I); + } protected: - ATTR_COLD virtual void start(); - ATTR_COLD virtual void update_param(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_COLD virtual void start(); + ATTR_COLD virtual void update_param(); + ATTR_HOT ATTR_ALIGN void update(); - netlist_param_model_t m_model; + netlist_param_model_t m_model; - double m_Vt; - double m_Is; - double m_n; + double m_Vt; + double m_Is; + double m_n; - double m_VtInv; - double m_Vcrit; - double m_Vd; + double m_VtInv; + double m_Vcrit; + double m_Vd; }; @@ -269,32 +269,32 @@ protected: class NETLIB_NAME(Q) : public netlist_device_t { public: - enum q_type { - BJT_NPN, - BJT_PNP - }; + enum q_type { + BJT_NPN, + BJT_PNP + }; - ATTR_COLD NETLIB_NAME(Q)(const q_type atype, const family_t afamily) - : netlist_device_t(afamily) - , m_qtype(atype) { } + ATTR_COLD NETLIB_NAME(Q)(const q_type atype, const family_t afamily) + : netlist_device_t(afamily) + , m_qtype(atype) { } - inline q_type qtype() const { return m_qtype; } - inline bool is_qtype(q_type atype) const { return m_qtype == atype; } + inline q_type qtype() const { return m_qtype; } + inline bool is_qtype(q_type atype) const { return m_qtype == atype; } protected: - ATTR_COLD virtual void start(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_COLD virtual void start(); + ATTR_HOT ATTR_ALIGN void update(); - netlist_param_model_t m_model; + netlist_param_model_t m_model; private: - q_type m_qtype; + q_type m_qtype; }; class NETLIB_NAME(QBJT) : public NETLIB_NAME(Q) { public: - ATTR_COLD NETLIB_NAME(QBJT)(const q_type atype, const family_t afamily) - : NETLIB_NAME(Q)(atype, afamily) { } + ATTR_COLD NETLIB_NAME(QBJT)(const q_type atype, const family_t afamily) + : NETLIB_NAME(Q)(atype, afamily) { } protected: @@ -306,51 +306,51 @@ template class NETLIB_NAME(QBJT_switch) : public NETLIB_NAME(QBJT) { public: - ATTR_COLD NETLIB_NAME(QBJT_switch)() - : NETLIB_NAME(QBJT)(_type, BJT_SWITCH), m_gB(NETLIST_GMIN), m_gC(NETLIST_GMIN), m_V(0.0), m_state_on(0) { } + ATTR_COLD NETLIB_NAME(QBJT_switch)() + : NETLIB_NAME(QBJT)(_type, BJT_SWITCH), m_gB(NETLIST_GMIN), m_gC(NETLIST_GMIN), m_V(0.0), m_state_on(0) { } - NETLIB_UPDATEI() - { - double vE = INPANALOG(m_EV); - double vB = INPANALOG(m_BV); + NETLIB_UPDATEI() + { + double vE = INPANALOG(m_EV); + double vB = INPANALOG(m_BV); - int new_state = (vB - vE > m_V ) ? 1 : 0; - if (m_state_on ^ new_state) - { - double gb = m_gB; - double gc = m_gC; - double v = m_V; - if (!new_state ) - { - // not conducting - gb = NETLIST_GMIN; - v = 0; - gc = NETLIST_GMIN; - } - m_RB.set(gb, v, 0.0); - m_RC.set(gc, 0.0, 0.0); - m_state_on = new_state; - m_RB.update_dev(); - m_RC.update_dev(); - } + int new_state = (vB - vE > m_V ) ? 1 : 0; + if (m_state_on ^ new_state) + { + double gb = m_gB; + double gc = m_gC; + double v = m_V; + if (!new_state ) + { + // not conducting + gb = NETLIST_GMIN; + v = 0; + gc = NETLIST_GMIN; + } + m_RB.set(gb, v, 0.0); + m_RC.set(gc, 0.0, 0.0); + m_state_on = new_state; + m_RB.update_dev(); + m_RC.update_dev(); + } - } + } - NETLIB_NAME(R) m_RB; - NETLIB_NAME(R) m_RC; + NETLIB_NAME(R) m_RB; + NETLIB_NAME(R) m_RC; - netlist_analog_input_t m_BV; - netlist_analog_input_t m_EV; + netlist_analog_input_t m_BV; + netlist_analog_input_t m_EV; protected: - ATTR_COLD virtual void start(); - ATTR_COLD void update_param(); + ATTR_COLD virtual void start(); + ATTR_COLD void update_param(); - double m_gB; // base conductance / switch on - double m_gC; // collector conductance / switch on - double m_V; // internal voltage source - UINT8 m_state_on; + double m_gB; // base conductance / switch on + double m_gC; // collector conductance / switch on + double m_V; // internal voltage source + UINT8 m_state_on; private: }; @@ -380,35 +380,34 @@ typedef NETLIB_NAME(QBJT_switch) NETLIB_NAME(QNPN_switc */ #define NETDEV_VCCS(_name) \ - NET_REGISTER_DEV(VCCS, _name) \ - + NET_REGISTER_DEV(VCCS, _name) //NETDEV_PARAMI(_name, model, _model) class NETLIB_NAME(VCCS) : public netlist_device_t { public: - ATTR_COLD NETLIB_NAME(VCCS)() - : netlist_device_t(VCCS) { } - ATTR_COLD NETLIB_NAME(VCCS)(const family_t afamily) - : netlist_device_t(afamily) { } + ATTR_COLD NETLIB_NAME(VCCS)() + : netlist_device_t(VCCS) { } + ATTR_COLD NETLIB_NAME(VCCS)(const family_t afamily) + : netlist_device_t(afamily) { } protected: - ATTR_COLD virtual void start(); - ATTR_COLD virtual void update_param(); - ATTR_HOT ATTR_ALIGN void update(); + ATTR_COLD virtual void start(); + ATTR_COLD virtual void update_param(); + ATTR_HOT ATTR_ALIGN void update(); - ATTR_COLD void configure(const double Gfac, const double GI); + ATTR_COLD void configure(const double Gfac, const double GI); - netlist_terminal_t m_OP; - netlist_terminal_t m_ON; + netlist_terminal_t m_OP; + netlist_terminal_t m_ON; - netlist_terminal_t m_IP; - netlist_terminal_t m_IN; + netlist_terminal_t m_IP; + netlist_terminal_t m_IN; - netlist_terminal_t m_OP1; - netlist_terminal_t m_ON1; + netlist_terminal_t m_OP1; + netlist_terminal_t m_ON1; - netlist_param_double_t m_G; + netlist_param_double_t m_G; }; // ---------------------------------------------------------------------------------------- @@ -439,28 +438,27 @@ protected: */ #define NETDEV_VCVS(_name) \ - NET_REGISTER_DEV(VCVS, _name) \ - + NET_REGISTER_DEV(VCVS, _name) //NETDEV_PARAMI(_name, model, _model) class NETLIB_NAME(VCVS) : public NETLIB_NAME(VCCS) { public: - ATTR_COLD NETLIB_NAME(VCVS)() - : NETLIB_NAME(VCCS)(VCVS) { } + ATTR_COLD NETLIB_NAME(VCVS)() + : NETLIB_NAME(VCCS)(VCVS) { } protected: - ATTR_COLD virtual void start(); - ATTR_COLD virtual void update_param(); - //ATTR_HOT ATTR_ALIGN void update(); + ATTR_COLD virtual void start(); + ATTR_COLD virtual void update_param(); + //ATTR_HOT ATTR_ALIGN void update(); - netlist_terminal_t m_OP2; - netlist_terminal_t m_ON2; + netlist_terminal_t m_OP2; + netlist_terminal_t m_ON2; - double m_mult; + double m_mult; - netlist_param_double_t m_RO; + netlist_param_double_t m_RO; }; diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c index cf7f4b28e3..0e1e11db90 100644 --- a/src/emu/netlist/nl_base.c +++ b/src/emu/netlist/nl_base.c @@ -22,21 +22,21 @@ ATTR_COLD netlist_object_t::netlist_object_t(const type_t atype, const family_t ATTR_COLD netlist_object_t::~netlist_object_t() { - //delete m_name; + //delete m_name; } ATTR_COLD void netlist_object_t::init_object(netlist_base_t &nl, const pstring &aname) { - m_netlist = &nl; - m_name = aname; - save_register(); + m_netlist = &nl; + m_name = aname; + save_register(); } ATTR_COLD const pstring &netlist_object_t::name() const { - if (m_name == "") - netlist().xfatalerror("object not initialized"); - return m_name; + if (m_name == "") + netlist().xfatalerror("object not initialized"); + return m_name; } // ---------------------------------------------------------------------------------------- @@ -44,17 +44,17 @@ ATTR_COLD const pstring &netlist_object_t::name() const // ---------------------------------------------------------------------------------------- ATTR_COLD netlist_owned_object_t::netlist_owned_object_t(const type_t atype, - const family_t afamily) + const family_t afamily) : netlist_object_t(atype, afamily) , m_netdev(NULL) { } ATTR_COLD void netlist_owned_object_t::init_object(netlist_core_device_t &dev, - const pstring &aname) + const pstring &aname) { - netlist_object_t::init_object(dev.netlist(), aname); - m_netdev = &dev; + netlist_object_t::init_object(dev.netlist(), aname); + m_netdev = &dev; } // ---------------------------------------------------------------------------------------- @@ -62,186 +62,186 @@ 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_time_ps(netlist_time::zero), - m_rem(0), - m_div(NETLIST_DIV), - m_mainclock(NULL), - m_solver(NULL) + : netlist_object_t(NETLIST, GENERIC), + m_time_ps(netlist_time::zero), + m_rem(0), + m_div(NETLIST_DIV), + m_mainclock(NULL), + m_solver(NULL) { } template static void tagmap_free_entries(T &tm) { - for (typename T::entry_t *entry = tm.first(); entry != NULL; entry = tm.next(entry)) - { - delete entry->object(); - } - tm.reset(); + for (typename T::entry_t *entry = tm.first(); entry != NULL; entry = tm.next(entry)) + { + delete entry->object(); + } + tm.reset(); } netlist_base_t::~netlist_base_t() { - tagmap_free_entries(m_devices); + tagmap_free_entries(m_devices); - netlist_net_t::list_t::entry_t *p = m_nets.first(); - while (p != NULL) - { - netlist_net_t::list_t::entry_t *pn = m_nets.next(p); - if (!p->object()->isRailNet()) - delete p->object(); - p = pn; - } + netlist_net_t::list_t::entry_t *p = m_nets.first(); + while (p != NULL) + { + netlist_net_t::list_t::entry_t *pn = m_nets.next(p); + if (!p->object()->isRailNet()) + delete p->object(); + p = pn; + } - m_nets.reset(); - pstring::resetmem(); + m_nets.reset(); + pstring::resetmem(); } ATTR_COLD netlist_net_t *netlist_base_t::find_net(const pstring &name) { - for (netlist_net_t::list_t::entry_t *p = m_nets.first(); p != NULL; p = m_nets.next(p)) - { - if (p->object()->name() == name) - return p->object(); - } - return NULL; + for (netlist_net_t::list_t::entry_t *p = m_nets.first(); p != NULL; p = m_nets.next(p)) + { + if (p->object()->name() == name) + return p->object(); + } + return NULL; } ATTR_COLD void netlist_base_t::set_mainclock_dev(NETLIB_NAME(mainclock) *dev) { - m_mainclock = dev; + m_mainclock = dev; } ATTR_COLD void netlist_base_t::set_solver_dev(NETLIB_NAME(solver) *dev) { - m_solver = dev; + m_solver = dev; } ATTR_COLD void netlist_base_t::reset() { - m_time_ps = netlist_time::zero; - m_rem = 0; - m_queue.clear(); - if (m_mainclock != NULL) - m_mainclock->m_Q.net().set_time(netlist_time::zero); + m_time_ps = netlist_time::zero; + m_rem = 0; + m_queue.clear(); + if (m_mainclock != NULL) + m_mainclock->m_Q.net().set_time(netlist_time::zero); - // FIXME: some const devices rely on this - /* make sure params are set now .. */ - for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry)) - { - entry->object()->update_param(); - } + // FIXME: some const devices rely on this + /* make sure params are set now .. */ + for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry)) + { + entry->object()->update_param(); + } - // Step all devices once ! - for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry)) - { - netlist_device_t *dev = entry->object(); - dev->update_dev(); - } + // Step all devices once ! + for (tagmap_devices_t::entry_t *entry = m_devices.first(); entry != NULL; entry = m_devices.next(entry)) + { + netlist_device_t *dev = entry->object(); + dev->update_dev(); + } } void netlist_base_t::set_clock_freq(UINT64 clockfreq) { - m_div = netlist_time::from_hz(clockfreq).as_raw(); - m_rem = 0; - assert_always(m_div == NETLIST_DIV, "netlist: illegal clock!"); - NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clockfreq, m_div)); + m_div = netlist_time::from_hz(clockfreq).as_raw(); + m_rem = 0; + assert_always(m_div == NETLIST_DIV, "netlist: illegal clock!"); + NL_VERBOSE_OUT(("Setting clock %" I64FMT "d and divisor %d\n", clockfreq, m_div)); } ATTR_HOT ATTR_ALIGN inline void netlist_base_t::update_time(const netlist_time t, INT32 &atime) { - if (NETLIST_DIV_BITS == 0) - { - const netlist_time delta = t - m_time_ps; - m_time_ps = t; - atime -= delta.as_raw(); - } else { - const netlist_time delta = t - m_time_ps + netlist_time::from_raw(m_rem); - m_time_ps = t; - m_rem = delta.as_raw() & NETLIST_MASK; - atime -= (delta.as_raw() >> NETLIST_DIV_BITS); + if (NETLIST_DIV_BITS == 0) + { + const netlist_time delta = t - m_time_ps; + m_time_ps = t; + atime -= delta.as_raw(); + } else { + const netlist_time delta = t - m_time_ps + netlist_time::from_raw(m_rem); + m_time_ps = t; + m_rem = delta.as_raw() & NETLIST_MASK; + atime -= (delta.as_raw() >> NETLIST_DIV_BITS); - // The folling is suitable for non-power of 2 m_divs ... - // atime -= divu_64x32_rem(delta.as_raw(), m_div, &m_rem); - } + // The folling is suitable for non-power of 2 m_divs ... + // atime -= divu_64x32_rem(delta.as_raw(), m_div, &m_rem); + } } ATTR_HOT ATTR_ALIGN void netlist_base_t::process_queue(INT32 &atime) { - if (m_mainclock == NULL) - { - while ( (atime > 0) && (m_queue.is_not_empty())) - { - const queue_t::entry_t &e = m_queue.pop(); - update_time(e.time(), atime); + if (m_mainclock == NULL) + { + while ( (atime > 0) && (m_queue.is_not_empty())) + { + const queue_t::entry_t &e = m_queue.pop(); + update_time(e.time(), atime); - //if (FATAL_ERROR_AFTER_NS) - // NL_VERBOSE_OUT(("%s\n", e.object().netdev()->name().cstr()); + //if (FATAL_ERROR_AFTER_NS) + // NL_VERBOSE_OUT(("%s\n", e.object().netdev()->name().cstr()); - e.object().update_devs(); + e.object().update_devs(); - add_to_stat(m_perf_out_processed, 1); + add_to_stat(m_perf_out_processed, 1); - if (FATAL_ERROR_AFTER_NS) - if (time() > NLTIME_FROM_NS(FATAL_ERROR_AFTER_NS)) - xfatalerror("Stopped"); - } + if (FATAL_ERROR_AFTER_NS) + if (time() > NLTIME_FROM_NS(FATAL_ERROR_AFTER_NS)) + xfatalerror("Stopped"); + } - if (atime > 0) - { - m_time_ps += netlist_time::from_raw(atime * m_div); - atime = 0; - } - } else { - netlist_net_t &mcQ = m_mainclock->m_Q.net(); - const netlist_time inc = m_mainclock->m_inc; + if (atime > 0) + { + m_time_ps += netlist_time::from_raw(atime * m_div); + atime = 0; + } + } else { + netlist_net_t &mcQ = m_mainclock->m_Q.net(); + const netlist_time inc = m_mainclock->m_inc; - while (atime > 0) - { - if (m_queue.is_not_empty()) - { - while (m_queue.peek().time() > mcQ.time()) - { - update_time(mcQ.time(), atime); + while (atime > 0) + { + if (m_queue.is_not_empty()) + { + while (m_queue.peek().time() > mcQ.time()) + { + update_time(mcQ.time(), atime); - NETLIB_NAME(mainclock)::mc_update(mcQ, time() + inc); + NETLIB_NAME(mainclock)::mc_update(mcQ, time() + inc); - } - const queue_t::entry_t &e = m_queue.pop(); + } + const queue_t::entry_t &e = m_queue.pop(); - update_time(e.time(), atime); + update_time(e.time(), atime); - e.object().update_devs(); + e.object().update_devs(); - } else { - update_time(mcQ.time(), atime); + } else { + update_time(mcQ.time(), atime); - NETLIB_NAME(mainclock)::mc_update(mcQ, time() + inc); - } - if (FATAL_ERROR_AFTER_NS) - if (time() > NLTIME_FROM_NS(FATAL_ERROR_AFTER_NS)) - xfatalerror("Stopped"); + NETLIB_NAME(mainclock)::mc_update(mcQ, time() + inc); + } + if (FATAL_ERROR_AFTER_NS) + if (time() > NLTIME_FROM_NS(FATAL_ERROR_AFTER_NS)) + xfatalerror("Stopped"); - add_to_stat(m_perf_out_processed, 1); - } + add_to_stat(m_perf_out_processed, 1); + } - if (atime > 0) - { - m_time_ps += netlist_time::from_raw(atime * m_div); - atime = 0; - } - } + if (atime > 0) + { + m_time_ps += netlist_time::from_raw(atime * m_div); + atime = 0; + } + } } ATTR_COLD void netlist_base_t::xfatalerror(const char *format, ...) const { - va_list ap; - va_start(ap, format); - //emu_fatalerror error(format, ap); - vfatalerror(format, ap); - va_end(ap); - //throw error; + va_list ap; + va_start(ap, format); + //emu_fatalerror error(format, ap); + vfatalerror(format, ap); + va_end(ap); + //throw error; } @@ -267,15 +267,15 @@ ATTR_COLD netlist_core_device_t::netlist_core_device_t(const family_t afamily) ATTR_COLD void netlist_core_device_t::init(netlist_base_t &anetlist, const pstring &name) { - init_object(anetlist, name); + init_object(anetlist, name); #if USE_DELEGATES #if USE_PMFDELEGATES - void (netlist_core_device_t::* pFunc)() = &netlist_core_device_t::update; - static_update = reinterpret_cast((this->*pFunc)); + void (netlist_core_device_t::* pFunc)() = &netlist_core_device_t::update; + static_update = reinterpret_cast((this->*pFunc)); #else - static_update = net_update_delegate(&netlist_core_device_t::update, "update", this); - // get the pointer to the member function + static_update = net_update_delegate(&netlist_core_device_t::update, "update", this); + // get the pointer to the member function #endif #endif @@ -287,15 +287,15 @@ ATTR_COLD netlist_core_device_t::~netlist_core_device_t() ATTR_HOT ATTR_ALIGN const netlist_sig_t netlist_core_device_t::INPLOGIC_PASSIVE(netlist_logic_input_t &inp) { - if (inp.state() == netlist_input_t::STATE_INP_PASSIVE) - { - inp.activate(); - const netlist_sig_t ret = inp.Q(); - inp.inactivate(); - return ret; - } - else - return inp.Q(); + if (inp.state() == netlist_input_t::STATE_INP_PASSIVE) + { + inp.activate(); + const netlist_sig_t ret = inp.Q(); + inp.inactivate(); + return ret; + } + else + return inp.Q(); } @@ -304,109 +304,109 @@ ATTR_HOT ATTR_ALIGN const netlist_sig_t netlist_core_device_t::INPLOGIC_PASSIVE( // ---------------------------------------------------------------------------------------- netlist_device_t::netlist_device_t() - : netlist_core_device_t(), - m_terminals(20) + : netlist_core_device_t(), + m_terminals(20) { } netlist_device_t::netlist_device_t(const family_t afamily) - : netlist_core_device_t(afamily), - m_terminals(20){ + : netlist_core_device_t(afamily), + m_terminals(20){ } netlist_device_t::~netlist_device_t() { - //NL_VERBOSE_OUT(("~net_device_t\n"); + //NL_VERBOSE_OUT(("~net_device_t\n"); } ATTR_COLD netlist_setup_t &netlist_device_t::setup() { - return netlist().setup(); + return netlist().setup(); } ATTR_COLD void netlist_device_t::init(netlist_base_t &anetlist, const pstring &name) { - netlist_core_device_t::init(anetlist, name); - start(); + netlist_core_device_t::init(anetlist, name); + start(); } ATTR_COLD void netlist_device_t::register_sub(netlist_device_t &dev, const pstring &name) { - dev.init(netlist(), this->name() + "." + name); + dev.init(netlist(), this->name() + "." + name); } ATTR_COLD void netlist_device_t::register_subalias(const pstring &name, const netlist_core_terminal_t &term) { - pstring alias = this->name() + "." + name; + pstring alias = this->name() + "." + name; - setup().register_alias(alias, term.name()); + setup().register_alias(alias, term.name()); - if (term.isType(netlist_terminal_t::INPUT)) - m_terminals.add(name); + if (term.isType(netlist_terminal_t::INPUT)) + m_terminals.add(name); } ATTR_COLD void netlist_device_t::register_terminal(const pstring &name, netlist_terminal_t &port) { - setup().register_object(*this,*this,name, port, netlist_terminal_t::STATE_INP_ACTIVE); + setup().register_object(*this,*this,name, port, netlist_terminal_t::STATE_INP_ACTIVE); } ATTR_COLD void netlist_device_t::register_output(const pstring &name, netlist_output_t &port) { - setup().register_object(*this,*this,name, port, netlist_terminal_t::STATE_OUT); + setup().register_object(*this,*this,name, port, netlist_terminal_t::STATE_OUT); } ATTR_COLD void netlist_device_t::register_input(const pstring &name, netlist_input_t &inp, netlist_input_t::state_e type) { - m_terminals.add(name); - setup().register_object(*this, *this, name, inp, type); + m_terminals.add(name); + setup().register_object(*this, *this, name, inp, type); } //FIXME: Get rid of this static void init_term(netlist_core_device_t &dev, netlist_core_terminal_t &term, netlist_input_t::state_e aState) { - if (!term.isInitalized()) - { - switch (term.type()) - { - case netlist_terminal_t::OUTPUT: - dynamic_cast(term).init_object(dev, dev.name() + ".INTOUT"); - break; - case netlist_terminal_t::INPUT: - dynamic_cast(term).init_object(dev, dev.name() + ".INTINP", aState); - break; - case netlist_terminal_t::TERMINAL: - dynamic_cast(term).init_object(dev, dev.name() + ".INTTERM", aState); - break; - default: - dev.netlist().xfatalerror("Unknown terminal type"); - break; - } - } + if (!term.isInitalized()) + { + switch (term.type()) + { + case netlist_terminal_t::OUTPUT: + dynamic_cast(term).init_object(dev, dev.name() + ".INTOUT"); + break; + case netlist_terminal_t::INPUT: + dynamic_cast(term).init_object(dev, dev.name() + ".INTINP", aState); + break; + case netlist_terminal_t::TERMINAL: + dynamic_cast(term).init_object(dev, dev.name() + ".INTTERM", aState); + break; + default: + dev.netlist().xfatalerror("Unknown terminal type"); + break; + } + } } // FIXME: Revise internal links ... //FIXME: Get rid of this ATTR_COLD void netlist_device_t::register_link_internal(netlist_core_device_t &dev, netlist_input_t &in, netlist_output_t &out, const netlist_input_t::state_e aState) { - init_term(dev, in, aState); - init_term(dev, out, aState); - setup().connect(in, out); + init_term(dev, in, aState); + init_term(dev, out, aState); + setup().connect(in, out); } ATTR_COLD void netlist_device_t::register_link_internal(netlist_input_t &in, netlist_output_t &out, const netlist_input_t::state_e aState) { - register_link_internal(*this, in, out, aState); + register_link_internal(*this, in, out, aState); } template ATTR_COLD void netlist_device_t::register_param(netlist_core_device_t &dev, const pstring &sname, C ¶m, const T initialVal) { - pstring fullname = dev.name() + "." + sname; - param.init_object(dev, fullname); - param.initial(initialVal); - //FIXME: pass fullname from above - setup().register_object(*this, *this, fullname, param, netlist_terminal_t::STATE_NONEX); + pstring fullname = dev.name() + "." + sname; + param.init_object(dev, fullname); + param.initial(initialVal); + //FIXME: pass fullname from above + setup().register_object(*this, *this, fullname, param, netlist_terminal_t::STATE_NONEX); } template ATTR_COLD void netlist_device_t::register_param(netlist_core_device_t &dev, const pstring &sname, netlist_param_double_t ¶m, const double initialVal); @@ -422,112 +422,111 @@ template ATTR_COLD void netlist_device_t::register_param(netlist_core_device_t & // ---------------------------------------------------------------------------------------- ATTR_COLD netlist_net_t::netlist_net_t(const type_t atype, const family_t afamily) - : netlist_object_t(atype, afamily) - , m_head(NULL) - , m_num_cons(0) - , m_time(netlist_time::zero) - , m_active(0) - , m_in_queue(2) - , m_railterminal(NULL) + : netlist_object_t(atype, afamily) + , m_head(NULL) + , m_num_cons(0) + , m_time(netlist_time::zero) + , m_active(0) + , m_in_queue(2) + , m_railterminal(NULL) { }; ATTR_COLD void netlist_net_t::init_object(netlist_base_t &nl, const pstring &aname) { - netlist_object_t::init_object(nl, aname); - nl.m_nets.add(this); + netlist_object_t::init_object(nl, aname); + nl.m_nets.add(this); } ATTR_COLD void netlist_net_t::register_railterminal(netlist_output_t &mr) { - assert(m_railterminal == NULL); - m_railterminal = &mr; + assert(m_railterminal == NULL); + m_railterminal = &mr; } ATTR_COLD void netlist_net_t::merge_net(netlist_net_t *othernet) { - NL_VERBOSE_OUT(("merging nets ...\n")); - if (othernet == NULL) - return; // Nothing to do + NL_VERBOSE_OUT(("merging nets ...\n")); + if (othernet == NULL) + return; // Nothing to do - if (this->isRailNet() && othernet->isRailNet()) - netlist().xfatalerror("Trying to merge to rail nets\n"); + if (this->isRailNet() && othernet->isRailNet()) + netlist().xfatalerror("Trying to merge to rail nets\n"); - if (othernet->isRailNet()) - { - NL_VERBOSE_OUT(("othernet is railnet\n")); - othernet->merge_net(this); - } - else - { - netlist_core_terminal_t *p = othernet->m_head; - while (p != NULL) - { - netlist_core_terminal_t *pn = p->m_update_list_next; - register_con(*p); - p = pn; - } + if (othernet->isRailNet()) + { + NL_VERBOSE_OUT(("othernet is railnet\n")); + othernet->merge_net(this); + } + else + { + netlist_core_terminal_t *p = othernet->m_head; + while (p != NULL) + { + netlist_core_terminal_t *pn = p->m_update_list_next; + register_con(*p); + p = pn; + } - othernet->m_head = NULL; // FIXME: othernet needs to be free'd from memory - } + othernet->m_head = NULL; // FIXME: othernet needs to be free'd from memory + } } ATTR_COLD void netlist_net_t::register_con(netlist_core_terminal_t &terminal) { - terminal.set_net(*this); + terminal.set_net(*this); - terminal.m_update_list_next = m_head; - m_head = &terminal; - m_num_cons++; + terminal.m_update_list_next = m_head; + m_head = &terminal; + m_num_cons++; - if (terminal.state() != netlist_input_t::STATE_INP_PASSIVE) - m_active++; + if (terminal.state() != netlist_input_t::STATE_INP_PASSIVE) + m_active++; } ATTR_HOT inline void netlist_net_t::update_dev(const netlist_core_terminal_t *inp, const UINT32 mask) const { - if ((inp->state() & mask) != 0) - { - netlist_core_device_t &netdev = inp->netdev(); - begin_timing(netdev.total_time); - inc_stat(netdev.stat_count); - netdev.update_dev(); - end_timing(netdev().total_time); - } + if ((inp->state() & mask) != 0) + { + netlist_core_device_t &netdev = inp->netdev(); + begin_timing(netdev.total_time); + inc_stat(netdev.stat_count); + netdev.update_dev(); + end_timing(netdev().total_time); + } } ATTR_HOT inline void netlist_net_t::update_devs() { - assert(m_num_cons != 0); + assert(m_num_cons != 0); - assert(this->isRailNet()); - { + assert(this->isRailNet()); + { + const UINT32 masks[4] = { 1, 5, 3, 1 }; + m_cur = m_new; + m_in_queue = 2; /* mark as taken ... */ - const UINT32 masks[4] = { 1, 5, 3, 1 }; - m_cur = m_new; - m_in_queue = 2; /* mark as taken ... */ + const UINT32 mask = masks[ (m_last.Q << 1) | m_cur.Q ]; - const UINT32 mask = masks[ (m_last.Q << 1) | m_cur.Q ]; - - netlist_core_terminal_t *p = m_head; - switch (m_num_cons) - { - case 2: - update_dev(p, mask); - p = p->m_update_list_next; - case 1: - update_dev(p, mask); - break; - default: - do - { - update_dev(p, mask); - p = p->m_update_list_next; - } while (p != NULL); - break; - } - m_last = m_cur; - } + netlist_core_terminal_t *p = m_head; + switch (m_num_cons) + { + case 2: + update_dev(p, mask); + p = p->m_update_list_next; + case 1: + update_dev(p, mask); + break; + default: + do + { + update_dev(p, mask); + p = p->m_update_list_next; + } while (p != NULL); + break; + } + m_last = m_cur; + } } // ---------------------------------------------------------------------------------------- @@ -540,7 +539,6 @@ ATTR_COLD netlist_core_terminal_t::netlist_core_terminal_t(const type_t atype, c , m_net(NULL) , m_state(STATE_NONEX) { - } ATTR_COLD netlist_terminal_t::netlist_terminal_t() @@ -549,18 +547,17 @@ ATTR_COLD netlist_terminal_t::netlist_terminal_t() , m_go(NETLIST_GMIN) , m_gt(NETLIST_GMIN) { - } ATTR_COLD void netlist_core_terminal_t::init_object(netlist_core_device_t &dev, const pstring &aname, const state_e astate) { - set_state(astate); - netlist_owned_object_t::init_object(dev, aname); + set_state(astate); + netlist_owned_object_t::init_object(dev, aname); } ATTR_COLD void netlist_core_terminal_t::set_net(netlist_net_t &anet) { - m_net = &anet; + m_net = &anet; } // ---------------------------------------------------------------------------------------- @@ -572,41 +569,41 @@ ATTR_COLD void netlist_core_terminal_t::set_net(netlist_net_t &anet) // ---------------------------------------------------------------------------------------- netlist_output_t::netlist_output_t(const type_t atype, const family_t afamily) - : netlist_core_terminal_t(atype, afamily) - , m_low_V(0.0) - , m_high_V(0.0) - , m_my_net(NET, afamily) + : netlist_core_terminal_t(atype, afamily) + , m_low_V(0.0) + , m_high_V(0.0) + , m_my_net(NET, afamily) { - //m_net = new net_net_t(NET_DIGITAL); - this->set_net(m_my_net); + //m_net = new net_net_t(NET_DIGITAL); + this->set_net(m_my_net); } ATTR_COLD void netlist_output_t::init_object(netlist_core_device_t &dev, const pstring &aname) { - netlist_core_terminal_t::init_object(dev, aname, STATE_OUT); - net().init_object(dev.netlist(), aname + ".net"); - net().register_railterminal(*this); + netlist_core_terminal_t::init_object(dev, aname, STATE_OUT); + net().init_object(dev.netlist(), aname + ".net"); + net().register_railterminal(*this); } ATTR_COLD void netlist_logic_output_t::initial(const netlist_sig_t val) { - net().m_cur.Q = val; - net().m_new.Q = val; - net().m_last.Q = !val; + net().m_cur.Q = val; + net().m_new.Q = val; + net().m_last.Q = !val; } ATTR_COLD netlist_logic_output_t::netlist_logic_output_t() - : netlist_output_t(OUTPUT, LOGIC) + : netlist_output_t(OUTPUT, LOGIC) { - // Default to TTL - m_low_V = 0.1; // these depend on sinked/sourced current. Values should be suitable for typical applications. - m_high_V = 4.8; + // Default to TTL + m_low_V = 0.1; // these depend on sinked/sourced current. Values should be suitable for typical applications. + m_high_V = 4.8; } ATTR_COLD void netlist_logic_output_t::set_levels(const double low, const double high) { - m_low_V = low; - m_high_V = high; + m_low_V = low; + m_high_V = high; } // ---------------------------------------------------------------------------------------- @@ -614,9 +611,9 @@ ATTR_COLD void netlist_logic_output_t::set_levels(const double low, const double // ---------------------------------------------------------------------------------------- ATTR_COLD netlist_ttl_output_t::netlist_ttl_output_t() - : netlist_logic_output_t() + : netlist_logic_output_t() { - set_levels(0.3, 3.4); + set_levels(0.3, 3.4); } // ---------------------------------------------------------------------------------------- @@ -624,16 +621,16 @@ ATTR_COLD netlist_ttl_output_t::netlist_ttl_output_t() // ---------------------------------------------------------------------------------------- ATTR_COLD netlist_analog_output_t::netlist_analog_output_t() - : netlist_output_t(OUTPUT, ANALOG) + : netlist_output_t(OUTPUT, ANALOG) { - net().m_cur.Analog = 0.0; - net().m_new.Analog = 99.0; + net().m_cur.Analog = 0.0; + net().m_new.Analog = 99.0; } ATTR_COLD void netlist_analog_output_t::initial(const double val) { - net().m_cur.Analog = val; - net().m_new.Analog = 99.0; + net().m_cur.Analog = val; + net().m_new.Analog = 99.0; } // ---------------------------------------------------------------------------------------- @@ -641,71 +638,71 @@ ATTR_COLD void netlist_analog_output_t::initial(const double val) // ---------------------------------------------------------------------------------------- ATTR_COLD netlist_param_t::netlist_param_t(const param_type_t atype) - : netlist_owned_object_t(PARAM, ANALOG) - , m_param_type(atype) + : netlist_owned_object_t(PARAM, ANALOG) + , m_param_type(atype) { } ATTR_COLD netlist_param_double_t::netlist_param_double_t() - : netlist_param_t(DOUBLE) - , m_param(0.0) + : netlist_param_t(DOUBLE) + , m_param(0.0) { } ATTR_COLD netlist_param_int_t::netlist_param_int_t() - : netlist_param_t(INTEGER) - , m_param(0) + : netlist_param_t(INTEGER) + , m_param(0) { } ATTR_COLD netlist_param_logic_t::netlist_param_logic_t() - : netlist_param_int_t() + : netlist_param_int_t() { } ATTR_COLD netlist_param_str_t::netlist_param_str_t() - : netlist_param_t(STRING) - , m_param("") + : netlist_param_t(STRING) + , m_param("") { } ATTR_COLD netlist_param_model_t::netlist_param_model_t() - : netlist_param_t(MODEL) - , m_param("") + : netlist_param_t(MODEL) + , m_param("") { } ATTR_COLD double netlist_param_model_t::dValue(const pstring &entity, const double defval) const { - pstring tmp = this->Value(); - // .model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon) - int p = tmp.ucase().find(entity.ucase() + "="); - if (p>=0) - { - int pblank = tmp.find(" ", p); - if (pblank < 0) pblank = tmp.len() + 1; - tmp = tmp.substr(p, pblank - p); - int pequal = tmp.find("=", 0); - if (pequal < 0) - netlist().xfatalerror("parameter %s misformat in model %s temp %s\n", entity.cstr(), Value().cstr(), tmp.cstr()); - tmp = tmp.substr(pequal+1); - double factor = 1.0; - switch (*(tmp.right(1).cstr())) - { - case 'm': factor = 1e-3; break; - case 'u': factor = 1e-6; break; - case 'n': factor = 1e-9; break; - case 'p': factor = 1e-12; break; - case 'f': factor = 1e-15; break; - case 'a': factor = 1e-18; break; + pstring tmp = this->Value(); + // .model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon) + int p = tmp.ucase().find(entity.ucase() + "="); + if (p>=0) + { + int pblank = tmp.find(" ", p); + if (pblank < 0) pblank = tmp.len() + 1; + tmp = tmp.substr(p, pblank - p); + int pequal = tmp.find("=", 0); + if (pequal < 0) + netlist().xfatalerror("parameter %s misformat in model %s temp %s\n", entity.cstr(), Value().cstr(), tmp.cstr()); + tmp = tmp.substr(pequal+1); + double factor = 1.0; + switch (*(tmp.right(1).cstr())) + { + case 'm': factor = 1e-3; break; + case 'u': factor = 1e-6; break; + case 'n': factor = 1e-9; break; + case 'p': factor = 1e-12; break; + case 'f': factor = 1e-15; break; + case 'a': factor = 1e-18; break; - } - if (factor != 1.0) - tmp = tmp.left(tmp.len() - 1); - return atof(tmp.cstr()) * factor; - } - else - return defval; + } + if (factor != 1.0) + tmp = tmp.left(tmp.len() - 1); + return atof(tmp.cstr()) * factor; + } + else + return defval; } @@ -715,28 +712,28 @@ ATTR_COLD double netlist_param_model_t::dValue(const pstring &entity, const doub ATTR_HOT inline void NETLIB_NAME(mainclock)::mc_update(netlist_net_t &net, const netlist_time curtime) { - net.m_new.Q = !net.m_new.Q; - net.set_time(curtime); - net.update_devs(); + net.m_new.Q = !net.m_new.Q; + net.set_time(curtime); + net.update_devs(); } NETLIB_START(mainclock) { - register_output("Q", m_Q); + register_output("Q", m_Q); - register_param("FREQ", m_freq, 7159000.0 * 5); - m_inc = netlist_time::from_hz(m_freq.Value()*2); + register_param("FREQ", m_freq, 7159000.0 * 5); + m_inc = netlist_time::from_hz(m_freq.Value()*2); } NETLIB_UPDATE_PARAM(mainclock) { - m_inc = netlist_time::from_hz(m_freq.Value()*2); + m_inc = netlist_time::from_hz(m_freq.Value()*2); } NETLIB_UPDATE(mainclock) { - netlist_net_t &net = m_Q.net(); - // this is only called during setup ... - net.m_new.Q = !net.m_new.Q; - net.set_time(netlist().time() + m_inc); + netlist_net_t &net = m_Q.net(); + // this is only called during setup ... + net.m_new.Q = !net.m_new.Q; + net.set_time(netlist().time() + m_inc); } diff --git a/src/emu/netlist/nl_base.h b/src/emu/netlist/nl_base.h index 60b0df807d..9bea1e4579 100644 --- a/src/emu/netlist/nl_base.h +++ b/src/emu/netlist/nl_base.h @@ -192,17 +192,17 @@ typedef delegate net_update_delegate; #define NETLIB_UPDATEI() ATTR_HOT ATTR_ALIGN inline void update(void) #define NETLIB_DEVICE_BASE(_name, _pclass, _extra, _priv) \ - class _name : public _pclass \ - { \ - public: \ - _name() \ - : _pclass() { } \ - protected: \ - _extra \ - ATTR_HOT void update(); \ - ATTR_HOT void start(); \ - _priv \ - } + class _name : public _pclass \ + { \ + public: \ + _name() \ + : _pclass() { } \ + protected: \ + _extra \ + ATTR_HOT void update(); \ + ATTR_HOT void start(); \ + _priv \ + } #define NETLIB_DEVICE_DERIVED(_name, _pclass, _priv) \ NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), , _priv) @@ -211,28 +211,28 @@ typedef delegate net_update_delegate; NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, , _priv) #define NETLIB_SUBDEVICE(_name, _priv) \ - class NETLIB_NAME(_name) : public netlist_device_t \ - { \ - public: \ - NETLIB_NAME(_name) () \ - : netlist_device_t() \ - { } \ - /*protected:*/ \ - ATTR_HOT void update(); \ - ATTR_HOT void start(); \ - public: \ - _priv \ - } + class NETLIB_NAME(_name) : public netlist_device_t \ + { \ + public: \ + NETLIB_NAME(_name) () \ + : netlist_device_t() \ + { } \ + /*protected:*/ \ + ATTR_HOT void update(); \ + ATTR_HOT void start(); \ + public: \ + _priv \ + } #define NETLIB_DEVICE_WITH_PARAMS(_name, _priv) \ - NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, \ - ATTR_HOT void update_param(); \ - , _priv) + NETLIB_DEVICE_BASE(NETLIB_NAME(_name), netlist_device_t, \ + ATTR_HOT void update_param(); \ + , _priv) #define NETLIB_DEVICE_WITH_PARAMS_DERIVED(_name, _pclass, _priv) \ - NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), \ - ATTR_HOT void update_param(); \ - , _priv) + NETLIB_DEVICE_BASE(NETLIB_NAME(_name), NETLIB_NAME(_pclass), \ + ATTR_HOT void update_param(); \ + , _priv) // ---------------------------------------------------------------------------------------- // forward definitions @@ -253,73 +253,73 @@ class NETLIB_NAME(mainclock); class netlist_object_t { - NETLIST_PREVENT_COPYING(netlist_object_t) + NETLIST_PREVENT_COPYING(netlist_object_t) public: enum type_t { - TERMINAL = 0, + TERMINAL = 0, INPUT = 1, OUTPUT = 2, PARAM = 3, NET = 4, - DEVICE = 5, - NETLIST = 6, + DEVICE = 5, + NETLIST = 6, + }; + enum family_t { + // Terminal families + LOGIC = 1, + ANALOG = 2, + // Device families + GENERIC = 3, // <== devices usually fall into this category + RESISTOR = 4, // Resistor + CAPACITOR = 5, // Capacitor + DIODE = 6, // Diode + BJT_SWITCH = 7, // BJT(Switch) + VCVS = 8, // Voltage controlled voltage source + VCCS = 9, // Voltage controlled voltage source }; - enum family_t { - // Terminal families - LOGIC = 1, - ANALOG = 2, - // Device families - GENERIC = 3, // <== devices usually fall into this category - RESISTOR = 4, // Resistor - CAPACITOR = 5, // Capacitor - DIODE = 6, // Diode - BJT_SWITCH = 7, // BJT(Switch) - VCVS = 8, // Voltage controlled voltage source - VCCS = 9, // Voltage controlled voltage source - }; ATTR_COLD netlist_object_t(const type_t atype, const family_t afamily); virtual ~netlist_object_t(); ATTR_COLD void init_object(netlist_base_t &nl, const pstring &aname); - ATTR_COLD bool isInitalized() { return (m_netlist != NULL); } + ATTR_COLD bool isInitalized() { return (m_netlist != NULL); } - ATTR_COLD const pstring &name() const; + ATTR_COLD const pstring &name() const; - PSTATE_INTERFACE(*m_netlist, name()) + PSTATE_INTERFACE(*m_netlist, name()) #if 0 - template ATTR_COLD void save(C &state, const pstring &stname) - { - save_state_ptr(stname, nl_datatype::type, sizeof(C), &state); - } + template ATTR_COLD void save(C &state, const pstring &stname) + { + save_state_ptr(stname, nl_datatype::type, sizeof(C), &state); + } #endif ATTR_HOT inline const type_t type() const { return m_objtype; } - ATTR_HOT inline const family_t family() const { return m_family; } + ATTR_HOT inline const family_t family() const { return m_family; } ATTR_HOT inline const bool isType(const type_t atype) const { return (m_objtype == atype); } - ATTR_HOT inline const bool isFamily(const family_t afamily) const { return (m_family == afamily); } + ATTR_HOT inline const bool isFamily(const family_t afamily) const { return (m_family == afamily); } - ATTR_HOT inline netlist_base_t & RESTRICT netlist() { return *m_netlist; } - ATTR_HOT inline const netlist_base_t & RESTRICT netlist() const { return *m_netlist; } + ATTR_HOT inline netlist_base_t & RESTRICT netlist() { return *m_netlist; } + ATTR_HOT inline const netlist_base_t & RESTRICT netlist() const { return *m_netlist; } protected: #if 0 - // pstate_interface virtual - ATTR_COLD virtual void save_state_ptr(const pstring &stname, const netlist_data_type_e, const int size, const int count, void *ptr); + // pstate_interface virtual + ATTR_COLD virtual void save_state_ptr(const pstring &stname, const netlist_data_type_e, const int size, const int count, void *ptr); #endif - // must call parent save_register ! - ATTR_COLD virtual void save_register() { }; + // must call parent save_register ! + ATTR_COLD virtual void save_register() { }; private: - pstring m_name; + pstring m_name; const type_t m_objtype; - const family_t m_family; - netlist_base_t * RESTRICT m_netlist; + const family_t m_family; + netlist_base_t * RESTRICT m_netlist; }; // ---------------------------------------------------------------------------------------- @@ -328,15 +328,15 @@ private: class netlist_owned_object_t : public netlist_object_t { - NETLIST_PREVENT_COPYING(netlist_owned_object_t) + NETLIST_PREVENT_COPYING(netlist_owned_object_t) public: - ATTR_COLD netlist_owned_object_t(const type_t atype, const family_t afamily); + ATTR_COLD netlist_owned_object_t(const type_t atype, const family_t afamily); - ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname); + ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname); - ATTR_HOT inline netlist_core_device_t & RESTRICT netdev() const { return *m_netdev; } + ATTR_HOT inline netlist_core_device_t & RESTRICT netdev() const { return *m_netdev; } private: - netlist_core_device_t * RESTRICT m_netdev; + netlist_core_device_t * RESTRICT m_netdev; }; // ---------------------------------------------------------------------------------------- @@ -345,46 +345,46 @@ private: class netlist_core_terminal_t : public netlist_owned_object_t { - NETLIST_PREVENT_COPYING(netlist_core_terminal_t) + NETLIST_PREVENT_COPYING(netlist_core_terminal_t) public: - /* needed here ... */ + /* needed here ... */ - enum state_e { - STATE_INP_PASSIVE = 0, - STATE_INP_ACTIVE = 1, - STATE_INP_HL = 2, - STATE_INP_LH = 4, - STATE_OUT = 128, - STATE_NONEX = 256 - }; + enum state_e { + STATE_INP_PASSIVE = 0, + STATE_INP_ACTIVE = 1, + STATE_INP_HL = 2, + STATE_INP_LH = 4, + STATE_OUT = 128, + STATE_NONEX = 256 + }; ATTR_COLD netlist_core_terminal_t(const type_t atype, const family_t afamily); ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname, const state_e astate); - ATTR_COLD void set_net(netlist_net_t &anet); - ATTR_COLD inline bool has_net() const { return (m_net != NULL); } - ATTR_HOT inline const netlist_net_t & RESTRICT net() const { return *m_net;} - ATTR_HOT inline netlist_net_t & RESTRICT net() { return *m_net;} + ATTR_COLD void set_net(netlist_net_t &anet); + ATTR_COLD inline bool has_net() const { return (m_net != NULL); } + ATTR_HOT inline const netlist_net_t & RESTRICT net() const { return *m_net;} + ATTR_HOT inline netlist_net_t & RESTRICT net() { return *m_net;} - ATTR_HOT inline const bool is_state(const state_e astate) const { return (m_state == astate); } - ATTR_HOT inline const state_e state() const { return m_state; } - ATTR_HOT inline void set_state(const state_e astate) - { - assert(astate != STATE_NONEX); - m_state = astate; - } + ATTR_HOT inline const bool is_state(const state_e astate) const { return (m_state == astate); } + ATTR_HOT inline const state_e state() const { return m_state; } + ATTR_HOT inline void set_state(const state_e astate) + { + assert(astate != STATE_NONEX); + m_state = astate; + } - netlist_core_terminal_t *m_update_list_next; + netlist_core_terminal_t *m_update_list_next; protected: - ATTR_COLD virtual void save_register() { save(NAME(m_state)); netlist_owned_object_t::save_register(); } + ATTR_COLD virtual void save_register() { save(NAME(m_state)); netlist_owned_object_t::save_register(); } private: - netlist_net_t * RESTRICT m_net; - state_e m_state; + netlist_net_t * RESTRICT m_net; + state_e m_state; }; NETLIST_SAVE_TYPE(netlist_core_terminal_t::state_e, DT_INT); @@ -392,45 +392,45 @@ NETLIST_SAVE_TYPE(netlist_core_terminal_t::state_e, DT_INT); class netlist_terminal_t : public netlist_core_terminal_t { - NETLIST_PREVENT_COPYING(netlist_terminal_t) + NETLIST_PREVENT_COPYING(netlist_terminal_t) public: - ATTR_COLD netlist_terminal_t(); + ATTR_COLD netlist_terminal_t(); - double m_Idr; // drive current - double m_go; // conductance for Voltage from other term - double m_gt; // conductance for total conductance + double m_Idr; // drive current + double m_go; // conductance for Voltage from other term + double m_gt; // conductance for total conductance - ATTR_HOT inline void set(const double G) - { - m_Idr = 0; - m_go = m_gt = G; - } + ATTR_HOT inline void set(const double G) + { + m_Idr = 0; + m_go = m_gt = G; + } - ATTR_HOT inline void set(const double GO, const double GT) - { - m_Idr = 0; - m_go = GO; - m_gt = GT; - } + ATTR_HOT inline void set(const double GO, const double GT) + { + m_Idr = 0; + m_go = GO; + m_gt = GT; + } - ATTR_HOT inline void set(const double GO, const double GT, const double I) - { - m_Idr = I; - m_go = GO; - m_gt = GT; - } + ATTR_HOT inline void set(const double GO, const double GT, const double I) + { + m_Idr = I; + m_go = GO; + m_gt = GT; + } - netlist_terminal_t *m_otherterm; + netlist_terminal_t *m_otherterm; protected: - ATTR_COLD virtual void save_register() - { - save(NAME(m_Idr)); - save(NAME(m_go)); - save(NAME(m_gt)); - netlist_core_terminal_t::save_register(); - } + ATTR_COLD virtual void save_register() + { + save(NAME(m_Idr)); + save(NAME(m_go)); + save(NAME(m_gt)); + netlist_core_terminal_t::save_register(); + } }; @@ -446,10 +446,10 @@ public: ATTR_COLD netlist_input_t(const type_t atype, const family_t afamily) : netlist_core_terminal_t(atype, afamily) - , m_low_thresh_V(0) - , m_high_thresh_V(0) + , m_low_thresh_V(0) + , m_high_thresh_V(0) { - set_state(STATE_INP_ACTIVE); + set_state(STATE_INP_ACTIVE); } ATTR_HOT inline void inactivate(); @@ -521,115 +521,115 @@ public: class netlist_net_t : public netlist_object_t { - NETLIST_PREVENT_COPYING(netlist_net_t) + NETLIST_PREVENT_COPYING(netlist_net_t) public: - typedef netlist_list_t list_t; + typedef netlist_list_t list_t; - friend class NETLIB_NAME(mainclock); - friend class netlist_matrix_solver_t; - friend class netlist_logic_output_t; - friend class netlist_analog_output_t; + friend class NETLIB_NAME(mainclock); + friend class netlist_matrix_solver_t; + friend class netlist_logic_output_t; + friend class netlist_analog_output_t; - // FIXME: union does not work - struct hybrid_t - { - inline hybrid_t() : Q(0), Analog(0.0) {} - netlist_sig_t Q; - double Analog; - }; + // FIXME: union does not work + struct hybrid_t + { + inline hybrid_t() : Q(0), Analog(0.0) {} + netlist_sig_t Q; + double Analog; + }; - ATTR_COLD netlist_net_t(const type_t atype, const family_t afamily); - ATTR_COLD void init_object(netlist_base_t &nl, const pstring &aname); + ATTR_COLD netlist_net_t(const type_t atype, const family_t afamily); + ATTR_COLD void init_object(netlist_base_t &nl, const pstring &aname); - ATTR_COLD void register_con(netlist_core_terminal_t &terminal); - ATTR_COLD void merge_net(netlist_net_t *othernet); - ATTR_COLD void register_railterminal(netlist_output_t &mr); + ATTR_COLD void register_con(netlist_core_terminal_t &terminal); + ATTR_COLD void merge_net(netlist_net_t *othernet); + ATTR_COLD void register_railterminal(netlist_output_t &mr); - /* inline not always works out */ - ATTR_HOT inline void update_devs(); + /* inline not always works out */ + ATTR_HOT inline 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 bool isRailNet() const { return !(m_railterminal == NULL); } + ATTR_HOT inline const netlist_core_terminal_t & RESTRICT railterminal() const { return *m_railterminal; } - /* Everything below is used by the logic subsystem */ + /* Everything below is used by the logic subsystem */ - ATTR_HOT inline void inc_active(); - ATTR_HOT inline void dec_active(); + ATTR_HOT inline void inc_active(); + ATTR_HOT inline void dec_active(); - ATTR_HOT inline const int active_count() const { return m_active; } + ATTR_HOT inline const int active_count() const { return m_active; } - ATTR_HOT inline const netlist_sig_t Q() const - { - assert(family() == LOGIC); - return m_cur.Q; - } + ATTR_HOT inline const netlist_sig_t Q() const + { + assert(family() == LOGIC); + return m_cur.Q; + } - ATTR_HOT inline const netlist_sig_t last_Q() const - { - assert(family() == LOGIC); - return m_last.Q; - } + ATTR_HOT inline const netlist_sig_t last_Q() const + { + assert(family() == LOGIC); + return m_last.Q; + } - ATTR_HOT inline const netlist_sig_t new_Q() const - { - assert(family() == LOGIC); - return m_new.Q; - } + ATTR_HOT inline const netlist_sig_t new_Q() const + { + assert(family() == LOGIC); + return m_new.Q; + } - ATTR_HOT inline const double Q_Analog() const - { - //assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG); - assert(family() == ANALOG); - return m_cur.Analog; - } + ATTR_HOT inline const double Q_Analog() const + { + //assert(object_type(SIGNAL_MASK) == SIGNAL_ANALOG); + assert(family() == ANALOG); + return m_cur.Analog; + } - ATTR_HOT inline void push_to_queue(const netlist_time &delay); - ATTR_HOT bool is_queued() { return m_in_queue == 1; } + ATTR_HOT inline void push_to_queue(const netlist_time &delay); + ATTR_HOT bool is_queued() { return m_in_queue == 1; } - // m_terms is only used by analog subsystem - typedef netlist_list_t terminal_list_t; + // m_terms is only used by analog subsystem + typedef netlist_list_t terminal_list_t; - terminal_list_t m_terms; - netlist_matrix_solver_t *m_solver; + terminal_list_t m_terms; + netlist_matrix_solver_t *m_solver; - netlist_core_terminal_t *m_head; + netlist_core_terminal_t *m_head; protected: - hybrid_t m_last; - hybrid_t m_cur; - hybrid_t m_new; + hybrid_t m_last; + hybrid_t m_cur; + hybrid_t m_new; - UINT32 m_num_cons; + UINT32 m_num_cons; protected: - ATTR_COLD virtual void save_register() - { - save(NAME(m_last.Analog)); - save(NAME(m_cur.Analog)); - save(NAME(m_new.Analog)); - save(NAME(m_last.Q)); - save(NAME(m_cur.Q)); - save(NAME(m_new.Q)); - save(NAME(m_time)); - save(NAME(m_active)); - save(NAME(m_in_queue)); - netlist_object_t::save_register(); - } + ATTR_COLD virtual void save_register() + { + save(NAME(m_last.Analog)); + save(NAME(m_cur.Analog)); + save(NAME(m_new.Analog)); + save(NAME(m_last.Q)); + save(NAME(m_cur.Q)); + save(NAME(m_new.Q)); + save(NAME(m_time)); + save(NAME(m_active)); + save(NAME(m_in_queue)); + netlist_object_t::save_register(); + } private: - ATTR_HOT void update_dev(const netlist_core_terminal_t *inp, const UINT32 mask) const; + ATTR_HOT void update_dev(const netlist_core_terminal_t *inp, const UINT32 mask) const; - netlist_time m_time; - INT32 m_active; - UINT32 m_in_queue; /* 0: not in queue, 1: in queue, 2: last was taken */ + netlist_time m_time; + INT32 m_active; + UINT32 m_in_queue; /* 0: not in queue, 1: in queue, 2: last was taken */ - netlist_core_terminal_t * RESTRICT m_railterminal; + netlist_core_terminal_t * RESTRICT m_railterminal; }; @@ -639,12 +639,12 @@ private: class netlist_output_t : public netlist_core_terminal_t { - NETLIST_PREVENT_COPYING(netlist_output_t) + NETLIST_PREVENT_COPYING(netlist_output_t) public: ATTR_COLD netlist_output_t(const type_t atype, const family_t afamily); - ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname); + ATTR_COLD void init_object(netlist_core_device_t &dev, const pstring &aname); double m_low_V; double m_high_V; @@ -658,23 +658,23 @@ private: class netlist_logic_output_t : public netlist_output_t { - NETLIST_PREVENT_COPYING(netlist_logic_output_t) + NETLIST_PREVENT_COPYING(netlist_logic_output_t) public: ATTR_COLD netlist_logic_output_t(); ATTR_COLD void initial(const netlist_sig_t val); - ATTR_COLD void set_levels(const double low, const double high); + ATTR_COLD void set_levels(const double low, const double high); ATTR_HOT inline void set_Q(const netlist_sig_t newQ, const netlist_time &delay) { - netlist_net_t &anet = net(); + netlist_net_t &anet = net(); if (EXPECTED(newQ != anet.m_new.Q)) { - anet.m_new.Q = newQ; + anet.m_new.Q = newQ; if (anet.m_num_cons) - anet.push_to_queue(delay); + anet.push_to_queue(delay); } } }; @@ -689,19 +689,19 @@ public: class netlist_analog_output_t : public netlist_output_t { - NETLIST_PREVENT_COPYING(netlist_analog_output_t) + NETLIST_PREVENT_COPYING(netlist_analog_output_t) public: ATTR_COLD netlist_analog_output_t(); - ATTR_COLD void initial(const double val); + ATTR_COLD void initial(const double val); - ATTR_HOT inline void set_Q(const double newQ, const netlist_time &delay) + ATTR_HOT inline void set_Q(const double newQ, const netlist_time &delay) { if (newQ != net().m_new.Analog) { - net().m_new.Analog = newQ; - net().push_to_queue(delay); + net().m_new.Analog = newQ; + net().push_to_queue(delay); } } @@ -713,105 +713,105 @@ public: class netlist_param_t : public netlist_owned_object_t { - NETLIST_PREVENT_COPYING(netlist_param_t) + NETLIST_PREVENT_COPYING(netlist_param_t) public: - enum param_type_t { - MODEL, - STRING, - DOUBLE, - INTEGER, - LOGIC - }; + enum param_type_t { + MODEL, + STRING, + DOUBLE, + INTEGER, + LOGIC + }; - ATTR_COLD netlist_param_t(const param_type_t atype); + ATTR_COLD netlist_param_t(const param_type_t atype); - ATTR_HOT inline const param_type_t param_type() const { return m_param_type; } + ATTR_HOT inline const param_type_t param_type() const { return m_param_type; } private: - const param_type_t m_param_type; + const param_type_t m_param_type; }; class netlist_param_double_t : public netlist_param_t { - NETLIST_PREVENT_COPYING(netlist_param_double_t) + NETLIST_PREVENT_COPYING(netlist_param_double_t) public: - ATTR_COLD netlist_param_double_t(); + ATTR_COLD netlist_param_double_t(); - ATTR_HOT inline void setTo(const double param); - ATTR_COLD inline void initial(const double val) { m_param = val; } - ATTR_HOT inline const double Value() const { return m_param; } + ATTR_HOT inline void setTo(const double param); + ATTR_COLD inline void initial(const double val) { m_param = val; } + ATTR_HOT inline const double Value() const { return m_param; } protected: - ATTR_COLD virtual void save_register() - { - save(NAME(m_param)); - netlist_param_t::save_register(); - } + ATTR_COLD virtual void save_register() + { + save(NAME(m_param)); + netlist_param_t::save_register(); + } private: - double m_param; + double m_param; }; class netlist_param_int_t : public netlist_param_t { - NETLIST_PREVENT_COPYING(netlist_param_int_t) + NETLIST_PREVENT_COPYING(netlist_param_int_t) public: - ATTR_COLD netlist_param_int_t(); + ATTR_COLD netlist_param_int_t(); - ATTR_HOT inline void setTo(const int param); - ATTR_COLD inline void initial(const int val) { m_param = val; } + ATTR_HOT inline void setTo(const int param); + ATTR_COLD inline void initial(const int val) { m_param = val; } - ATTR_HOT inline const int Value() const { return m_param; } + ATTR_HOT inline const int Value() const { return m_param; } protected: - ATTR_COLD virtual void save_register() - { - save(NAME(m_param)); - netlist_param_t::save_register(); - } + ATTR_COLD virtual void save_register() + { + save(NAME(m_param)); + netlist_param_t::save_register(); + } private: - int m_param; + int m_param; }; class netlist_param_logic_t : public netlist_param_int_t { - NETLIST_PREVENT_COPYING(netlist_param_logic_t) + NETLIST_PREVENT_COPYING(netlist_param_logic_t) public: - ATTR_COLD netlist_param_logic_t(); + ATTR_COLD netlist_param_logic_t(); }; class netlist_param_str_t : public netlist_param_t { - NETLIST_PREVENT_COPYING(netlist_param_str_t) + NETLIST_PREVENT_COPYING(netlist_param_str_t) public: - ATTR_COLD netlist_param_str_t(); + ATTR_COLD netlist_param_str_t(); - ATTR_HOT inline void setTo(const pstring ¶m); - ATTR_COLD inline void initial(const pstring &val) { m_param = val; } + ATTR_HOT inline void setTo(const pstring ¶m); + ATTR_COLD inline void initial(const pstring &val) { m_param = val; } - ATTR_HOT inline const pstring &Value() const { return m_param; } + ATTR_HOT inline const pstring &Value() const { return m_param; } private: - pstring m_param; + pstring m_param; }; class netlist_param_model_t : public netlist_param_t { - NETLIST_PREVENT_COPYING(netlist_param_model_t) + NETLIST_PREVENT_COPYING(netlist_param_model_t) public: - ATTR_COLD netlist_param_model_t(); + ATTR_COLD netlist_param_model_t(); - ATTR_COLD inline void initial(const pstring &val) { m_param = val; } + ATTR_COLD inline void initial(const pstring &val) { m_param = val; } - ATTR_HOT inline const pstring &Value() const { return m_param; } + ATTR_HOT inline const pstring &Value() const { return m_param; } - /* these should be cached! */ - ATTR_COLD double dValue(const pstring &entity, const double defval = 0.0) const; + /* these should be cached! */ + ATTR_COLD double dValue(const pstring &entity, const double defval = 0.0) const; private: - pstring m_param; + pstring m_param; }; // ---------------------------------------------------------------------------------------- @@ -820,15 +820,15 @@ private: class netlist_core_device_t : public netlist_object_t { - NETLIST_PREVENT_COPYING(netlist_core_device_t) + NETLIST_PREVENT_COPYING(netlist_core_device_t) public: - typedef netlist_list_t list_t; + typedef netlist_list_t list_t; - ATTR_COLD netlist_core_device_t(); - ATTR_COLD netlist_core_device_t(const family_t afamily); + ATTR_COLD netlist_core_device_t(); + ATTR_COLD netlist_core_device_t(const family_t afamily); - ATTR_COLD virtual ~netlist_core_device_t(); + ATTR_COLD virtual ~netlist_core_device_t(); ATTR_COLD virtual void init(netlist_base_t &anetlist, const pstring &name); @@ -848,7 +848,7 @@ public: #endif } - ATTR_HOT const netlist_sig_t INPLOGIC_PASSIVE(netlist_logic_input_t &inp); + ATTR_HOT const netlist_sig_t INPLOGIC_PASSIVE(netlist_logic_input_t &inp); ATTR_HOT inline const netlist_sig_t INPLOGIC(const netlist_logic_input_t &inp) const { @@ -885,10 +885,10 @@ public: ATTR_HOT virtual void dec_active() { } ATTR_HOT virtual void step_time(const double st) { } - ATTR_HOT virtual void update_terminals() { } + ATTR_HOT virtual void update_terminals() { } #if (NL_KEEP_STATISTICS) - /* stats */ + /* stats */ osd_ticks_t total_time; INT32 stat_count; #endif @@ -908,11 +908,11 @@ private: class netlist_device_t : public netlist_core_device_t { - NETLIST_PREVENT_COPYING(netlist_device_t) + NETLIST_PREVENT_COPYING(netlist_device_t) public: ATTR_COLD netlist_device_t(); - ATTR_COLD netlist_device_t(const family_t afamily); + ATTR_COLD netlist_device_t(const family_t afamily); ATTR_COLD virtual ~netlist_device_t(); @@ -921,9 +921,9 @@ public: ATTR_COLD netlist_setup_t &setup(); ATTR_COLD void register_sub(netlist_device_t &dev, const pstring &name); - ATTR_COLD void register_subalias(const pstring &name, const netlist_core_terminal_t &term); + ATTR_COLD void register_subalias(const pstring &name, const netlist_core_terminal_t &term); - ATTR_COLD void register_terminal(const pstring &name, netlist_terminal_t &port); + ATTR_COLD void register_terminal(const pstring &name, netlist_terminal_t &port); ATTR_COLD void register_output(const pstring &name, netlist_output_t &out); @@ -932,23 +932,23 @@ public: ATTR_COLD void register_link_internal(netlist_input_t &in, netlist_output_t &out, const netlist_input_t::state_e aState); ATTR_COLD void register_link_internal(netlist_core_device_t &dev, netlist_input_t &in, netlist_output_t &out, const netlist_input_t::state_e aState); - /* driving logic outputs don't count in here */ + /* driving logic outputs don't count in here */ netlist_list_t m_terminals; protected: ATTR_HOT virtual void update() { } ATTR_HOT virtual void start() { } - ATTR_HOT virtual void update_terminals() { } + ATTR_HOT virtual void update_terminals() { } - template + template ATTR_COLD void register_param(const pstring &sname, C ¶m, const T initialVal) { - register_param(*this, sname, param, initialVal); + register_param(*this, sname, param, initialVal); } template - ATTR_COLD void register_param(netlist_core_device_t &dev, const pstring &sname, C ¶m, const T initialVal); + ATTR_COLD void register_param(netlist_core_device_t &dev, const pstring &sname, C ¶m, const T initialVal); private: }; @@ -962,7 +962,7 @@ typedef tagmap_t tagmap_devices_t; class netlist_base_t : public netlist_object_t, public pstate_manager_t { - NETLIST_PREVENT_COPYING(netlist_base_t) + NETLIST_PREVENT_COPYING(netlist_base_t) public: typedef netlist_timed_queue queue_t; @@ -970,8 +970,8 @@ public: netlist_base_t(); virtual ~netlist_base_t(); - ATTR_HOT inline const queue_t &queue() const { return m_queue; } - ATTR_HOT inline queue_t &queue() { return m_queue; } + ATTR_HOT inline const queue_t &queue() const { return m_queue; } + ATTR_HOT inline queue_t &queue() { return m_queue; } ATTR_HOT inline void push_to_queue(netlist_net_t &out, const netlist_time &attime) { @@ -984,21 +984,21 @@ public: ATTR_HOT inline const netlist_time &time() const { return m_time_ps; } - ATTR_COLD void set_mainclock_dev(NETLIB_NAME(mainclock) *dev); - ATTR_COLD void set_solver_dev(NETLIB_NAME(solver) *dev); - ATTR_COLD void set_setup(netlist_setup_t *asetup) { m_setup = asetup; } + ATTR_COLD void set_mainclock_dev(NETLIB_NAME(mainclock) *dev); + ATTR_COLD void set_solver_dev(NETLIB_NAME(solver) *dev); + ATTR_COLD void set_setup(netlist_setup_t *asetup) { m_setup = asetup; } - ATTR_COLD netlist_net_t *find_net(const pstring &name); + ATTR_COLD netlist_net_t *find_net(const pstring &name); - ATTR_COLD void set_clock_freq(UINT64 clockfreq); + ATTR_COLD void set_clock_freq(UINT64 clockfreq); - ATTR_COLD netlist_setup_t &setup() { return *m_setup; } + ATTR_COLD netlist_setup_t &setup() { return *m_setup; } ATTR_COLD void reset(); ATTR_COLD void xfatalerror(const char *format, ...) const; - tagmap_devices_t m_devices; - netlist_net_t::list_t m_nets; + tagmap_devices_t m_devices; + netlist_net_t::list_t m_nets; protected: @@ -1006,14 +1006,14 @@ protected: virtual void vfatalerror(const char *format, va_list ap) const = 0; protected: - ATTR_COLD virtual void save_register() - { - //queue_t m_queue; - save(NAME(m_time_ps)); - save(NAME(m_rem)); - save(NAME(m_div)); - netlist_object_t::save_register(); - } + ATTR_COLD virtual void save_register() + { + //queue_t m_queue; + save(NAME(m_time_ps)); + save(NAME(m_rem)); + save(NAME(m_div)); + netlist_object_t::save_register(); + } #if (NL_KEEP_STATISTICS) // performance @@ -1023,17 +1023,17 @@ protected: #endif private: - ATTR_HOT void update_time(const netlist_time t, INT32 &atime); + ATTR_HOT void update_time(const netlist_time t, INT32 &atime); - netlist_time m_time_ps; - queue_t m_queue; + netlist_time m_time_ps; + queue_t m_queue; UINT32 m_rem; UINT32 m_div; NETLIB_NAME(mainclock) * m_mainclock; - NETLIB_NAME(solver) * m_solver; + NETLIB_NAME(solver) * m_solver; - netlist_setup_t *m_setup; + netlist_setup_t *m_setup; }; // ---------------------------------------------------------------------------------------- @@ -1060,8 +1060,8 @@ public: protected: ATTR_COLD void start() { - register_input("I", m_I, netlist_terminal_t::STATE_INP_ACTIVE); - register_output("Q", m_Q); + register_input("I", m_I, netlist_terminal_t::STATE_INP_ACTIVE); + register_output("Q", m_Q); m_Q.initial(1); } @@ -1072,7 +1072,7 @@ protected: else if (m_I.Q_Analog() < m_I.m_low_thresh_V) OUTLOGIC(m_Q, 0, NLTIME_FROM_NS(1)); else - OUTLOGIC(m_Q, m_Q.net().last_Q(), NLTIME_FROM_NS(1)); + OUTLOGIC(m_Q, m_Q.net().last_Q(), NLTIME_FROM_NS(1)); } }; @@ -1084,7 +1084,7 @@ protected: class nld_d_to_a_proxy : public netlist_device_t { public: - ATTR_COLD nld_d_to_a_proxy(netlist_output_t &out_proxied) + ATTR_COLD nld_d_to_a_proxy(netlist_output_t &out_proxied) : netlist_device_t() { //assert(out_proxied.object_type(SIGNAL_MASK) == SIGNAL_DIGITAL); @@ -1093,7 +1093,7 @@ public: m_high_V = out_proxied.m_high_V; } - ATTR_COLD virtual ~nld_d_to_a_proxy() {} + ATTR_COLD virtual ~nld_d_to_a_proxy() {} netlist_ttl_input_t m_I; netlist_analog_output_t m_Q; @@ -1101,8 +1101,8 @@ public: protected: ATTR_COLD void start() { - register_input("I", m_I, netlist_terminal_t::STATE_INP_ACTIVE); - register_output("Q", m_Q); + register_input("I", m_I, netlist_terminal_t::STATE_INP_ACTIVE); + register_output("Q", m_Q); m_Q.initial(0); } @@ -1122,20 +1122,20 @@ private: ATTR_HOT inline void netlist_param_str_t::setTo(const pstring ¶m) { - m_param = param; - netdev().update_param(); + m_param = param; + netdev().update_param(); } ATTR_HOT inline void netlist_param_int_t::setTo(const int param) { - m_param = param; - netdev().update_param(); + m_param = param; + netdev().update_param(); } ATTR_HOT inline void netlist_param_double_t::setTo(const double param) { - m_param = param; - netdev().update_param(); + m_param = param; + netdev().update_param(); } @@ -1193,12 +1193,12 @@ ATTR_HOT inline void netlist_net_t::inc_active() m_active++; if (USE_DEACTIVE_DEVICE) - if (m_active == 1 && m_in_queue > 0) - { - m_last = m_cur; - railterminal().netdev().inc_active(); - m_cur = m_new; - } + if (m_active == 1 && m_in_queue > 0) + { + m_last = m_cur; + railterminal().netdev().inc_active(); + m_cur = m_new; + } if (EXPECTED(m_active == 1 && m_in_queue == 0)) { @@ -1219,8 +1219,8 @@ ATTR_HOT inline void netlist_net_t::dec_active() { m_active--; if (USE_DEACTIVE_DEVICE) - if (m_active == 0) - railterminal().netdev().dec_active(); + if (m_active == 0) + railterminal().netdev().dec_active(); } @@ -1251,7 +1251,7 @@ ATTR_HOT inline const bool netlist_analog_input_t::is_highz() const class net_device_t_base_factory { - NETLIST_PREVENT_COPYING(net_device_t_base_factory) + NETLIST_PREVENT_COPYING(net_device_t_base_factory) public: net_device_t_base_factory(const pstring &name, const pstring &classname) : m_name(name), m_classname(classname) @@ -1271,7 +1271,7 @@ protected: template class net_device_t_factory : public net_device_t_base_factory { - NETLIST_PREVENT_COPYING(net_device_t_factory) + NETLIST_PREVENT_COPYING(net_device_t_factory) public: net_device_t_factory(const pstring &name, const pstring &classname) : net_device_t_base_factory(name, classname) { } @@ -1288,23 +1288,23 @@ class netlist_factory { public: - netlist_factory(); - ~netlist_factory(); + netlist_factory(); + ~netlist_factory(); - void initialize(); + void initialize(); - template - void register_device(const pstring &name, const pstring &classname) - { - m_list.add(new net_device_t_factory< _C >(name, classname) ); - } + template + void register_device(const pstring &name, const pstring &classname) + { + m_list.add(new net_device_t_factory< _C >(name, classname) ); + } - netlist_device_t *new_device_by_classname(const pstring &classname, netlist_setup_t &setup) const; - netlist_device_t *new_device_by_name(const pstring &name, netlist_setup_t &setup) const; + netlist_device_t *new_device_by_classname(const pstring &classname, netlist_setup_t &setup) const; + netlist_device_t *new_device_by_name(const pstring &name, netlist_setup_t &setup) const; private: - typedef netlist_list_t list_t; - list_t m_list; + typedef netlist_list_t list_t; + list_t m_list; }; diff --git a/src/emu/netlist/nl_config.h b/src/emu/netlist/nl_config.h index 63f8e8c8c6..0f73d57b78 100644 --- a/src/emu/netlist/nl_config.h +++ b/src/emu/netlist/nl_config.h @@ -65,10 +65,9 @@ typedef UINT8 netlist_sig_t; // prevent implicit copying #define NETLIST_PREVENT_COPYING(_name) \ - private: \ - _name(const _name &); \ - _name &operator=(const _name &); \ - + private: \ + _name(const _name &); \ + _name &operator=(const _name &); #if NL_KEEP_STATISTICS #define add_to_stat(v,x) do { v += (x); } while (0) #define inc_stat(v) add_to_stat(v, 1) diff --git a/src/emu/netlist/nl_lists.h b/src/emu/netlist/nl_lists.h index 3d4d70c023..ef32fb03c1 100644 --- a/src/emu/netlist/nl_lists.h +++ b/src/emu/netlist/nl_lists.h @@ -20,13 +20,12 @@ struct netlist_list_t { public: - struct entry_t { + struct entry_t { + // keep compatibility with tagmap + _ListClass object() { return m_obj; } - // keep compatibility with tagmap - _ListClass object() { return m_obj; } - - _ListClass m_obj; - }; + _ListClass m_obj; + }; ATTR_COLD netlist_list_t(int numElements = _NumElem) { @@ -36,25 +35,25 @@ public: m_ptr--; } - ATTR_COLD netlist_list_t(const netlist_list_t &rhs) - { - m_list = new entry_t[m_num_elements]; - m_ptr = m_list; - m_ptr--; - for (int i=0; iadd(rhs[i]); - } - } + ATTR_COLD netlist_list_t(const netlist_list_t &rhs) + { + m_list = new entry_t[m_num_elements]; + m_ptr = m_list; + m_ptr--; + for (int i=0; iadd(rhs[i]); + } + } - ATTR_COLD netlist_list_t &operator=(const netlist_list_t &rhs) - { - for (int i=0; iadd(rhs[i]); - } - return *this; - } + ATTR_COLD netlist_list_t &operator=(const netlist_list_t &rhs) + { + for (int i=0; iadd(rhs[i]); + } + return *this; + } ATTR_COLD ~netlist_list_t() @@ -64,50 +63,50 @@ public: ATTR_HOT inline void add(const _ListClass elem) { if (m_ptr-m_list >= m_num_elements - 1) - resize(m_num_elements * 2); + resize(m_num_elements * 2); (++m_ptr)->m_obj = elem; } ATTR_HOT inline void resize(const int new_size) { - int cnt = count(); - entry_t *m_new = new entry_t[new_size]; - entry_t *pd = m_new; + int cnt = count(); + entry_t *m_new = new entry_t[new_size]; + entry_t *pd = m_new; - for (entry_t *ps = m_list; ps <= m_ptr; ps++, pd++) - *pd = *ps; - delete[] m_list; - m_list = m_new; - m_ptr = m_list + cnt - 1; - m_num_elements = new_size; + for (entry_t *ps = m_list; ps <= m_ptr; ps++, pd++) + *pd = *ps; + delete[] m_list; + m_list = m_new; + m_ptr = m_list + cnt - 1; + m_num_elements = new_size; + } + ATTR_HOT inline void remove(const _ListClass elem) + { + for (entry_t *i = m_list; i <= m_ptr; i++) + { + if (i->object() == elem) + { + while (i < m_ptr) + { + *i = *(i+1); + i++; + } + m_ptr--; + return; + } + } + } + ATTR_HOT inline bool contains(const _ListClass elem) const + { + for (entry_t *i = m_list; i <= m_ptr; i++) + { + if (i->object() == elem) + return true; + } + return false; } - ATTR_HOT inline void remove(const _ListClass elem) - { - for (entry_t *i = m_list; i <= m_ptr; i++) - { - if (i->object() == elem) - { - while (i < m_ptr) - { - *i = *(i+1); - i++; - } - m_ptr--; - return; - } - } - } - ATTR_HOT inline bool contains(const _ListClass elem) const - { - for (entry_t *i = m_list; i <= m_ptr; i++) - { - if (i->object() == elem) - return true; - } - return false; - } ATTR_HOT inline entry_t *first() const { return (m_ptr >= m_list ? &m_list[0] : NULL ); } - ATTR_HOT inline entry_t *next(entry_t *lc) const { return (lc < last() ? lc + 1 : NULL ); } + ATTR_HOT inline entry_t *next(entry_t *lc) const { return (lc < last() ? lc + 1 : NULL ); } ATTR_HOT inline entry_t *last() const { return m_ptr; } ATTR_HOT inline int count() const { return m_ptr - m_list + 1; } ATTR_HOT inline bool empty() const { return (m_ptr < m_list); } @@ -115,16 +114,16 @@ public: ATTR_COLD void reset_and_free() { - for (entry_t *i = m_list; i <= m_ptr; i++) - { - delete i->object(); - } - reset(); + for (entry_t *i = m_list; i <= m_ptr; i++) + { + delete i->object(); + } + reset(); } - //ATTR_HOT inline entry_t *item(int i) const { return &m_list[i]; } + //ATTR_HOT inline entry_t *item(int i) const { return &m_list[i]; } ATTR_HOT inline _ListClass& operator[](const int & index) { return m_list[index].m_obj; } - ATTR_HOT inline const _ListClass& operator[](const int & index) const { return m_list[index].m_obj; } + ATTR_HOT inline const _ListClass& operator[](const int & index) const { return m_list[index].m_obj; } private: entry_t * m_ptr; @@ -140,7 +139,7 @@ private: template class netlist_timed_queue { - NETLIST_PREVENT_COPYING(netlist_timed_queue) + NETLIST_PREVENT_COPYING(netlist_timed_queue) public: struct entry_t @@ -153,7 +152,7 @@ public: ATTR_HOT inline _Element & object() const { return *m_object; } ATTR_HOT inline const _Time *time_ptr() const { return &m_time; } - ATTR_HOT inline _Element *object_ptr() const { return m_object; } + ATTR_HOT inline _Element *object_ptr() const { return m_object; } private: _Time m_time; _Element *m_object; @@ -165,7 +164,7 @@ public: clear(); } - ATTR_HOT inline int capacity() const { return _Size; } + ATTR_HOT inline int capacity() const { return _Size; } 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]); } diff --git a/src/emu/netlist/nl_parser.c b/src/emu/netlist/nl_parser.c index 42ccbda80b..3766cba311 100644 --- a/src/emu/netlist/nl_parser.c +++ b/src/emu/netlist/nl_parser.c @@ -27,18 +27,18 @@ void netlist_parser::parse(const char *buf) NL_VERBOSE_OUT(("Parser: Device: %s\n", n.cstr())); if (n == "NET_ALIAS") net_alias(); - else if (n == "NET_C") - net_c(); + else if (n == "NET_C") + net_c(); else if (n == "NETDEV_PARAM") netdev_param(); - else if (n == "NETDEV_R") - netdev_device(n, "R"); - else if (n == "NETDEV_C") - netdev_device(n, "C"); - else if (n == "NETDEV_POT") - netdev_device(n, "R"); - else if (n == "NETDEV_D") - netdev_device(n, "model", true); + else if (n == "NETDEV_R") + netdev_device(n, "R"); + else if (n == "NETDEV_C") + netdev_device(n, "C"); + else if (n == "NETDEV_POT") + netdev_device(n, "R"); + else if (n == "NETDEV_D") + netdev_device(n, "model", true); else if ((n == "NETDEV_TTL_CONST") || (n == "NETDEV_ANALOG_CONST")) netdev_const(n); else @@ -60,14 +60,14 @@ void netlist_parser::net_alias() void netlist_parser::net_c() { - pstring t1; - pstring t2; - skipws(); - t1 = getname(','); - skipws(); - t2 = getname(')'); - NL_VERBOSE_OUT(("Parser: Connect: %s %s\n", t1.cstr(), t2.cstr())); - m_setup.register_link(t1 , t2); + pstring t1; + pstring t2; + skipws(); + t1 = getname(','); + skipws(); + t2 = getname(')'); + NL_VERBOSE_OUT(("Parser: Connect: %s %s\n", t1.cstr(), t2.cstr())); + m_setup.register_link(t1 , t2); } void netlist_parser::netdev_param() @@ -98,7 +98,7 @@ void netlist_parser::netdev_const(const pstring &dev_name) val = eval_param(); paramfq = name + ".CONST"; NL_VERBOSE_OUT(("Parser: Const: %s %f\n", name.cstr(), val)); - check_char(')'); + check_char(')'); m_setup.register_param(paramfq, val); } @@ -126,43 +126,43 @@ void netlist_parser::netdev_device(const pstring &dev_type) } /* if (cnt != dev->m_terminals.count() && !dev->variable_input_count()) - fatalerror("netlist: input count mismatch for %s - expected %d found %d\n", devname.cstr(), dev->m_terminals.count(), cnt); - if (dev->variable_input_count()) - { - NL_VERBOSE_OUT(("variable inputs %s: %d\n", dev->name().cstr(), cnt)); - } - */ + fatalerror("netlist: input count mismatch for %s - expected %d found %d\n", devname.cstr(), dev->m_terminals.count(), cnt); + if (dev->variable_input_count()) + { + NL_VERBOSE_OUT(("variable inputs %s: %d\n", dev->name().cstr(), cnt)); + } + */ } void netlist_parser::netdev_device(const pstring &dev_type, const pstring &default_param, bool isString) { - netlist_device_t *dev; + netlist_device_t *dev; - skipws(); - pstring devname = getname2(',', ')'); - pstring defparam = devname + "." + default_param; - dev = m_setup.factory().new_device_by_name(dev_type, m_setup); - m_setup.register_dev(dev, devname); - NL_VERBOSE_OUT(("Parser: IC: %s\n", devname.cstr())); - if (getc() != ')') - { - // have a default param - skipws(); - if (isString) - { - pstring val = getname(')'); - ungetc(); - NL_VERBOSE_OUT(("Parser: Default param: %s %s\n", defparam.cstr(), val.cstr())); - m_setup.register_param(defparam, val); - } - else - { - double val = eval_param(); - NL_VERBOSE_OUT(("Parser: Default param: %s %f\n", defparam.cstr(), val)); - m_setup.register_param(defparam, val); - } - } - check_char(')'); + skipws(); + pstring devname = getname2(',', ')'); + pstring defparam = devname + "." + default_param; + dev = m_setup.factory().new_device_by_name(dev_type, m_setup); + m_setup.register_dev(dev, devname); + NL_VERBOSE_OUT(("Parser: IC: %s\n", devname.cstr())); + if (getc() != ')') + { + // have a default param + skipws(); + if (isString) + { + pstring val = getname(')'); + ungetc(); + NL_VERBOSE_OUT(("Parser: Default param: %s %s\n", defparam.cstr(), val.cstr())); + m_setup.register_param(defparam, val); + } + else + { + double val = eval_param(); + NL_VERBOSE_OUT(("Parser: Default param: %s %f\n", defparam.cstr(), val)); + m_setup.register_param(defparam, val); + } + } + check_char(')'); } // ---------------------------------------------------------------------------------------- @@ -171,7 +171,7 @@ void netlist_parser::netdev_device(const pstring &dev_type, const pstring &defau void netlist_parser::skipeol() { - char c = getc(); + char c = getc(); while (c) { if (c == 10) @@ -197,27 +197,27 @@ void netlist_parser::skipws() case 13: break; case '/': - c = getc(); + c = getc(); if (c == '/') { - skipeol(); + skipeol(); } else if (c == '*') { - int f=0; - while ((c = getc()) != 0 ) - { - if (f == 0 && c == '*') - f=1; - else if (f == 1 && c== '/' ) - break; - else - f=0; - } + int f=0; + while ((c = getc()) != 0 ) + { + if (f == 0 && c == '*') + f=1; + else if (f == 1 && c== '/' ) + break; + else + f=0; + } } break; default: - ungetc(); + ungetc(); return; } } @@ -243,8 +243,8 @@ pstring netlist_parser::getname2(char sep1, char sep2) while ((c != sep1) && (c != sep2)) { - *p1++ = c; - c = getc(); + *p1++ = c; + c = getc(); } *p1 = 0; ungetc(); @@ -278,21 +278,21 @@ double netlist_parser::eval_param() f = i; ret = s.substr(strlen(macs[f])).as_double(&e); if ((f>0) && e) - m_setup.netlist().xfatalerror("Parser: Error with parameter ...\n"); - if (f>0) - check_char(')'); + m_setup.netlist().xfatalerror("Parser: Error with parameter ...\n"); + if (f>0) + check_char(')'); return ret * facs[f]; } unsigned char netlist_parser::getc() { - if (*m_px) - return *(m_px++); - else - return *m_px; + if (*m_px) + return *(m_px++); + else + return *m_px; } void netlist_parser::ungetc() { - m_px--; + m_px--; } diff --git a/src/emu/netlist/nl_parser.h b/src/emu/netlist/nl_parser.h index 4f673f1857..e985e05167 100644 --- a/src/emu/netlist/nl_parser.h +++ b/src/emu/netlist/nl_parser.h @@ -12,7 +12,7 @@ class netlist_parser { - NETLIST_PREVENT_COPYING(netlist_parser) + NETLIST_PREVENT_COPYING(netlist_parser) public: netlist_parser(netlist_setup_t &setup) : m_setup(setup) {} @@ -20,10 +20,10 @@ public: void parse(const char *buf); void net_alias(); void netdev_param(); - void net_c(); + void net_c(); void netdev_const(const pstring &dev_name); void netdev_device(const pstring &dev_type); - void netdev_device(const pstring &dev_type, const pstring &default_param, bool isString = false); + void netdev_device(const pstring &dev_type, const pstring &default_param, bool isString = false); private: diff --git a/src/emu/netlist/nl_setup.c b/src/emu/netlist/nl_setup.c index 21072b4ba4..e78b7299a1 100644 --- a/src/emu/netlist/nl_setup.c +++ b/src/emu/netlist/nl_setup.c @@ -17,9 +17,9 @@ static NETLIST_START(base) NETDEV_TTL_CONST(ttllow, 0) NETDEV_ANALOG_CONST(NC, NETLIST_HIGHIMP_V) - NET_MODEL(".model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)") - NET_MODEL(".model 1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)") - NET_MODEL(".MODEL BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45V ICRATING=100M MFG=ZETEX)") + NET_MODEL(".model 1N914 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)") + NET_MODEL(".model 1N4148 D(Is=2.52n Rs=.568 N=1.752 Cjo=4p M=.4 tt=20n Iave=200m Vpk=75 mfg=OnSemi type=silicon)") + NET_MODEL(".MODEL BC237B NPN(IS=1.8E-14 ISE=5.0E-14 ISC=1.72E-13 XTI=3 BF=400 BR=35.5 IKF=0.14 IKR=0.03 XTB=1.5 VAF=80 VAR=12.5 VJE=0.58 VJC=0.54 RE=0.6 RC=0.25 RB=0.56 CJE=13E-12 CJC=4E-12 XCJC=0.75 FC=0.5 NF=0.9955 NR=1.005 NE=1.46 NC=1.27 MJE=0.33 MJC=0.33 TF=0.64E-9 TR=50.72E-9 EG=1.11 KF=0 AF=1 VCEO=45V ICRATING=100M MFG=ZETEX)") NETLIST_END @@ -30,15 +30,15 @@ NETLIST_END netlist_setup_t::netlist_setup_t(netlist_base_t &netlist) : m_netlist(netlist) - , m_proxy_cnt(0) + , m_proxy_cnt(0) { - netlist.set_setup(this); + netlist.set_setup(this); } void netlist_setup_t::init() { - m_factory.initialize(); - NETLIST_NAME(base)(*this); + m_factory.initialize(); + NETLIST_NAME(base)(*this); } @@ -59,7 +59,7 @@ netlist_setup_t::~netlist_setup_t() netlist_device_t *netlist_setup_t::register_dev(netlist_device_t *dev, const pstring &name) { if (!(netlist().m_devices.add(name, dev, false)==TMERR_NONE)) - netlist().xfatalerror("Error adding %s to device list\n", name.cstr()); + netlist().xfatalerror("Error adding %s to device list\n", name.cstr()); return dev; } @@ -85,7 +85,7 @@ void netlist_setup_t::remove_dev(const pstring &name) netlist_device_t *dev = netlist().m_devices.find(name); pstring temp = name + "."; if (dev == NULL) - netlist().xfatalerror("Device %s does not exist\n", name.cstr()); + netlist().xfatalerror("Device %s does not exist\n", name.cstr()); //remove_start_with(m_inputs, temp); remove_start_with(m_terminals, temp); @@ -94,193 +94,193 @@ void netlist_setup_t::remove_dev(const pstring &name) tagmap_link_t::entry_t *p = m_links.first(); while (p != NULL) { - tagmap_link_t::entry_t *n = m_links.next(p); - if (temp.equals(p->object().e1.substr(0,temp.len())) || temp.equals(p->object().e2.substr(0,temp.len()))) - m_links.remove(p->object()); - p = n; + tagmap_link_t::entry_t *n = m_links.next(p); + if (temp.equals(p->object().e1.substr(0,temp.len())) || temp.equals(p->object().e2.substr(0,temp.len()))) + m_links.remove(p->object()); + p = n; } netlist().m_devices.remove(name); } void netlist_setup_t::register_model(const pstring &model) { - m_models.add(model); + m_models.add(model); } void netlist_setup_t::register_alias(const pstring &alias, const pstring &out) { - //if (!(m_alias.add(alias, new nstring(out), false)==TMERR_NONE)) + //if (!(m_alias.add(alias, new nstring(out), false)==TMERR_NONE)) if (!(m_alias.add(alias, out, false)==TMERR_NONE)) - netlist().xfatalerror("Error adding alias %s to alias list\n", alias.cstr()); + netlist().xfatalerror("Error adding alias %s to alias list\n", alias.cstr()); } pstring netlist_setup_t::objtype_as_astr(netlist_object_t &in) { - switch (in.type()) - { - case netlist_terminal_t::TERMINAL: - return "TERMINAL"; - break; - case netlist_terminal_t::INPUT: - return "INPUT"; - break; - case netlist_terminal_t::OUTPUT: - return "OUTPUT"; - break; - case netlist_terminal_t::NET: - return "NET"; - break; - case netlist_terminal_t::PARAM: - return "PARAM"; - break; - case netlist_terminal_t::DEVICE: - return "DEVICE"; - break; - case netlist_terminal_t::NETLIST: - return "NETLIST"; - break; - } - // FIXME: noreturn - netlist().xfatalerror("Unknown object type %d\n", in.type()); - return "Error"; + switch (in.type()) + { + case netlist_terminal_t::TERMINAL: + return "TERMINAL"; + break; + case netlist_terminal_t::INPUT: + return "INPUT"; + break; + case netlist_terminal_t::OUTPUT: + return "OUTPUT"; + break; + case netlist_terminal_t::NET: + return "NET"; + break; + case netlist_terminal_t::PARAM: + return "PARAM"; + break; + case netlist_terminal_t::DEVICE: + return "DEVICE"; + break; + case netlist_terminal_t::NETLIST: + return "NETLIST"; + break; + } + // FIXME: noreturn + netlist().xfatalerror("Unknown object type %d\n", in.type()); + return "Error"; } void netlist_setup_t::register_object(netlist_device_t &dev, netlist_core_device_t &upd_dev, const pstring &name, netlist_object_t &obj, const netlist_input_t::state_e state) { - switch (obj.type()) - { - case netlist_terminal_t::TERMINAL: - case netlist_terminal_t::INPUT: - case netlist_terminal_t::OUTPUT: - { - netlist_core_terminal_t &term = dynamic_cast(obj); - if (obj.isType(netlist_terminal_t::OUTPUT)) - dynamic_cast(term).init_object(upd_dev, dev.name() + "." + name); - else - term.init_object(upd_dev, dev.name() + "." + name, state); + switch (obj.type()) + { + case netlist_terminal_t::TERMINAL: + case netlist_terminal_t::INPUT: + case netlist_terminal_t::OUTPUT: + { + netlist_core_terminal_t &term = dynamic_cast(obj); + if (obj.isType(netlist_terminal_t::OUTPUT)) + dynamic_cast(term).init_object(upd_dev, dev.name() + "." + name); + else + term.init_object(upd_dev, dev.name() + "." + name, state); - if (!(m_terminals.add(term.name(), &term, false)==TMERR_NONE)) - netlist().xfatalerror("Error adding %s %s to terminal list\n", objtype_as_astr(term).cstr(), term.name().cstr()); - NL_VERBOSE_OUT(("%s %s\n", objtype_as_astr(term).cstr(), name.cstr())); - } - break; - case netlist_terminal_t::NET: - break; - case netlist_terminal_t::PARAM: - { - netlist_param_t ¶m = dynamic_cast(obj); - const pstring val = m_params_temp.find(name); - if (val != "") - { - switch (param.param_type()) - { - case netlist_param_t::DOUBLE: - { - NL_VERBOSE_OUT(("Found parameter ... %s : %s\n", temp.cstr(), val->cstr())); - double vald = 0; - if (sscanf(val.cstr(), "%lf", &vald) != 1) - netlist().xfatalerror("Invalid number conversion %s : %s\n", name.cstr(), val.cstr()); - dynamic_cast(param).initial(vald); - } - break; - case netlist_param_t::INTEGER: - case netlist_param_t::LOGIC: - { - NL_VERBOSE_OUT(("Found parameter ... %s : %s\n", name.cstr(), val->cstr())); - int vald = 0; - if (sscanf(val.cstr(), "%d", &vald) != 1) - netlist().xfatalerror("Invalid number conversion %s : %s\n", name.cstr(), val.cstr()); - dynamic_cast(param).initial(vald); - } - break; - case netlist_param_t::STRING: - { - dynamic_cast(param).initial(val); - } - break; - case netlist_param_t::MODEL: - { - pstring search = (".model " + val + " ").ucase(); - bool found = false; - for (int i=0; i < m_models.count(); i++) - { - if (m_models[i].ucase().startsWith(search)) - { - int pl=m_models[i].find("("); - int pr=m_models[i].find("("); - dynamic_cast(param).initial(m_models[i].substr(pl+1,pr-pl-1)); - found = true; - break; - } - } - if (!found) - netlist().xfatalerror("Model %s not found\n", val.cstr()); - } - break; - default: - netlist().xfatalerror("Parameter is not supported %s : %s\n", name.cstr(), val.cstr()); - } - } - if (!(m_params.add(name, ¶m, false)==TMERR_NONE)) - netlist().xfatalerror("Error adding parameter %s to parameter list\n", name.cstr()); - } - break; - case netlist_terminal_t::DEVICE: - netlist().xfatalerror("Device registration not yet supported - \n", name.cstr()); - break; - case netlist_terminal_t::NETLIST: - netlist().xfatalerror("Netlist registration not yet supported - \n", name.cstr()); - break; - } + if (!(m_terminals.add(term.name(), &term, false)==TMERR_NONE)) + netlist().xfatalerror("Error adding %s %s to terminal list\n", objtype_as_astr(term).cstr(), term.name().cstr()); + NL_VERBOSE_OUT(("%s %s\n", objtype_as_astr(term).cstr(), name.cstr())); + } + break; + case netlist_terminal_t::NET: + break; + case netlist_terminal_t::PARAM: + { + netlist_param_t ¶m = dynamic_cast(obj); + const pstring val = m_params_temp.find(name); + if (val != "") + { + switch (param.param_type()) + { + case netlist_param_t::DOUBLE: + { + NL_VERBOSE_OUT(("Found parameter ... %s : %s\n", temp.cstr(), val->cstr())); + double vald = 0; + if (sscanf(val.cstr(), "%lf", &vald) != 1) + netlist().xfatalerror("Invalid number conversion %s : %s\n", name.cstr(), val.cstr()); + dynamic_cast(param).initial(vald); + } + break; + case netlist_param_t::INTEGER: + case netlist_param_t::LOGIC: + { + NL_VERBOSE_OUT(("Found parameter ... %s : %s\n", name.cstr(), val->cstr())); + int vald = 0; + if (sscanf(val.cstr(), "%d", &vald) != 1) + netlist().xfatalerror("Invalid number conversion %s : %s\n", name.cstr(), val.cstr()); + dynamic_cast(param).initial(vald); + } + break; + case netlist_param_t::STRING: + { + dynamic_cast(param).initial(val); + } + break; + case netlist_param_t::MODEL: + { + pstring search = (".model " + val + " ").ucase(); + bool found = false; + for (int i=0; i < m_models.count(); i++) + { + if (m_models[i].ucase().startsWith(search)) + { + int pl=m_models[i].find("("); + int pr=m_models[i].find("("); + dynamic_cast(param).initial(m_models[i].substr(pl+1,pr-pl-1)); + found = true; + break; + } + } + if (!found) + netlist().xfatalerror("Model %s not found\n", val.cstr()); + } + break; + default: + netlist().xfatalerror("Parameter is not supported %s : %s\n", name.cstr(), val.cstr()); + } + } + if (!(m_params.add(name, ¶m, false)==TMERR_NONE)) + netlist().xfatalerror("Error adding parameter %s to parameter list\n", name.cstr()); + } + break; + case netlist_terminal_t::DEVICE: + netlist().xfatalerror("Device registration not yet supported - \n", name.cstr()); + break; + case netlist_terminal_t::NETLIST: + netlist().xfatalerror("Netlist registration not yet supported - \n", name.cstr()); + break; + } } void netlist_setup_t::register_link(const pstring &sin, const pstring &sout) { link_t temp = link_t(sin, sout); NL_VERBOSE_OUT(("link %s <== %s\n", sin.cstr(), sout.cstr())); - m_links.add(temp); + m_links.add(temp); //if (!(m_links.add(sin + "." + sout, temp, false)==TMERR_NONE)) - // fatalerror("Error adding link %s<==%s to link list\n", sin.cstr(), sout.cstr()); + // fatalerror("Error adding link %s<==%s to link list\n", sin.cstr(), sout.cstr()); } void netlist_setup_t::register_param(const pstring ¶m, const double value) { - // FIXME: there should be a better way - register_param(param, pstring::sprintf("%.9e", value)); + // FIXME: there should be a better way + register_param(param, pstring::sprintf("%.9e", value)); } void netlist_setup_t::register_param(const pstring ¶m, const pstring &value) { - //if (!(m_params_temp.add(param, new nstring(value), false)==TMERR_NONE)) - if (!(m_params_temp.add(param, value, false)==TMERR_NONE)) - netlist().xfatalerror("Error adding parameter %s to parameter list\n", param.cstr()); + //if (!(m_params_temp.add(param, new nstring(value), false)==TMERR_NONE)) + if (!(m_params_temp.add(param, value, false)==TMERR_NONE)) + netlist().xfatalerror("Error adding parameter %s to parameter list\n", param.cstr()); } const pstring netlist_setup_t::resolve_alias(const pstring &name) const { - pstring temp = name; - pstring ret; + pstring temp = name; + pstring ret; - /* FIXME: Detect endless loop */ - do { - ret = temp; - temp = m_alias.find(ret); - } while (temp != ""); + /* FIXME: Detect endless loop */ + do { + ret = temp; + temp = m_alias.find(ret); + } while (temp != ""); - int p = ret.find(".["); + int p = ret.find(".["); if (p > 0) { - pstring dname = ret; - netlist_device_t *dev = netlist().m_devices.find(dname.substr(0,p)); - if (dev == NULL) - netlist().xfatalerror("Device for %s not found\n", name.cstr()); - int c = atoi(ret.substr(p+2,ret.len()-p-3)); - temp = dev->name() + "." + dev->m_terminals[c]; - // reresolve .... - do { - ret = temp; - temp = m_alias.find(ret); - } while (temp != ""); + pstring dname = ret; + netlist_device_t *dev = netlist().m_devices.find(dname.substr(0,p)); + if (dev == NULL) + netlist().xfatalerror("Device for %s not found\n", name.cstr()); + int c = atoi(ret.substr(p+2,ret.len()-p-3)); + temp = dev->name() + "." + dev->m_terminals[c]; + // reresolve .... + do { + ret = temp; + temp = m_alias.find(ret); + } while (temp != ""); } NL_VERBOSE_OUT(("%s==>%s\n", name.cstr(), ret.cstr())); @@ -289,22 +289,22 @@ const pstring netlist_setup_t::resolve_alias(const pstring &name) const netlist_core_terminal_t *netlist_setup_t::find_terminal(const pstring &terminal_in, bool required) { - const pstring &tname = resolve_alias(terminal_in); - netlist_core_terminal_t *ret; + const pstring &tname = resolve_alias(terminal_in); + netlist_core_terminal_t *ret; - ret = m_terminals.find(tname); - /* look for default */ - if (ret == NULL) - { - /* look for ".Q" std output */ - pstring s = tname + ".Q"; - ret = m_terminals.find(s); - } - if (ret == NULL && required) - netlist().xfatalerror("terminal %s(%s) not found!\n", terminal_in.cstr(), tname.cstr()); - if (ret != NULL) - NL_VERBOSE_OUT(("Found input %s\n", tname.cstr())); - return ret; + ret = m_terminals.find(tname); + /* look for default */ + if (ret == NULL) + { + /* look for ".Q" std output */ + pstring s = tname + ".Q"; + ret = m_terminals.find(s); + } + if (ret == NULL && required) + netlist().xfatalerror("terminal %s(%s) not found!\n", terminal_in.cstr(), tname.cstr()); + if (ret != NULL) + NL_VERBOSE_OUT(("Found input %s\n", tname.cstr())); + return ret; } netlist_core_terminal_t *netlist_setup_t::find_terminal(const pstring &terminal_in, netlist_object_t::type_t atype, bool required) @@ -322,15 +322,15 @@ netlist_core_terminal_t *netlist_setup_t::find_terminal(const pstring &terminal_ } if (ret == NULL && required) netlist().xfatalerror("terminal %s(%s) not found!\n", terminal_in.cstr(), tname.cstr()); - if (ret != NULL && ret->type() != atype) - { - if (required) - netlist().xfatalerror("object %s(%s) found but wrong type\n", terminal_in.cstr(), tname.cstr()); - else - ret = NULL; - } - if (ret != NULL) - NL_VERBOSE_OUT(("Found input %s\n", tname.cstr())); + if (ret != NULL && ret->type() != atype) + { + if (required) + netlist().xfatalerror("object %s(%s) found but wrong type\n", terminal_in.cstr(), tname.cstr()); + else + ret = NULL; + } + if (ret != NULL) + NL_VERBOSE_OUT(("Found input %s\n", tname.cstr())); return ret; } @@ -341,269 +341,267 @@ netlist_param_t *netlist_setup_t::find_param(const pstring ¶m_in, bool requi ret = m_params.find(outname); if (ret == NULL && required) - netlist().xfatalerror("parameter %s(%s) not found!\n", param_in.cstr(), outname.cstr()); + netlist().xfatalerror("parameter %s(%s) not found!\n", param_in.cstr(), outname.cstr()); if (ret != NULL) - NL_VERBOSE_OUT(("Found parameter %s\n", outname.cstr())); + NL_VERBOSE_OUT(("Found parameter %s\n", outname.cstr())); return ret; } void netlist_setup_t::connect_input_output(netlist_input_t &in, netlist_output_t &out) { - if (out.isFamily(netlist_terminal_t::ANALOG) && in.isFamily(netlist_terminal_t::LOGIC)) - { - nld_a_to_d_proxy *proxy = new nld_a_to_d_proxy(in); - pstring x = pstring::sprintf("proxy_ad_%d", m_proxy_cnt); - m_proxy_cnt++; + if (out.isFamily(netlist_terminal_t::ANALOG) && in.isFamily(netlist_terminal_t::LOGIC)) + { + nld_a_to_d_proxy *proxy = new nld_a_to_d_proxy(in); + pstring x = pstring::sprintf("proxy_ad_%d", m_proxy_cnt); + m_proxy_cnt++; - proxy->init(netlist(), x); - register_dev(proxy, x); + proxy->init(netlist(), x); + register_dev(proxy, x); - proxy->m_Q.net().register_con(in); - out.net().register_con(proxy->m_I); + proxy->m_Q.net().register_con(in); + out.net().register_con(proxy->m_I); - } - else if (out.isFamily(netlist_terminal_t::LOGIC) && in.isFamily(netlist_terminal_t::ANALOG)) - { - nld_d_to_a_proxy *proxy = new nld_d_to_a_proxy(out); - pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt); - m_proxy_cnt++; + } + else if (out.isFamily(netlist_terminal_t::LOGIC) && in.isFamily(netlist_terminal_t::ANALOG)) + { + nld_d_to_a_proxy *proxy = new nld_d_to_a_proxy(out); + pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt); + m_proxy_cnt++; - proxy->init(netlist(), x); - register_dev(proxy, x); + proxy->init(netlist(), x); + register_dev(proxy, x); - proxy->m_Q.net().register_con(in); - out.net().register_con(proxy->m_I); - } - else - { - out.net().register_con(in); - } + proxy->m_Q.net().register_con(in); + out.net().register_con(proxy->m_I); + } + else + { + out.net().register_con(in); + } } void netlist_setup_t::connect_terminal_input(netlist_terminal_t &term, netlist_input_t &inp) { - if (inp.isFamily(netlist_terminal_t::ANALOG)) - { - connect_terminals(inp, term); - } - else if (inp.isFamily(netlist_terminal_t::LOGIC)) - { - NL_VERBOSE_OUT(("connect_terminal_input: connecting proxy\n")); - nld_a_to_d_proxy *proxy = new nld_a_to_d_proxy(inp); - pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt); - m_proxy_cnt++; + if (inp.isFamily(netlist_terminal_t::ANALOG)) + { + connect_terminals(inp, term); + } + else if (inp.isFamily(netlist_terminal_t::LOGIC)) + { + NL_VERBOSE_OUT(("connect_terminal_input: connecting proxy\n")); + nld_a_to_d_proxy *proxy = new nld_a_to_d_proxy(inp); + pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt); + m_proxy_cnt++; - proxy->init(netlist(), x); - register_dev(proxy, x); + proxy->init(netlist(), x); + register_dev(proxy, x); - connect_terminals(term, proxy->m_I); + connect_terminals(term, proxy->m_I); - if (inp.has_net()) - //fatalerror("logic inputs can only belong to one net!\n"); - proxy->m_Q.net().merge_net(&inp.net()); - else - proxy->m_Q.net().register_con(inp); - } - else - { - netlist().xfatalerror("Netlist: Severe Error"); - } + if (inp.has_net()) + //fatalerror("logic inputs can only belong to one net!\n"); + proxy->m_Q.net().merge_net(&inp.net()); + else + proxy->m_Q.net().register_con(inp); + } + else + { + netlist().xfatalerror("Netlist: Severe Error"); + } } // FIXME: optimize code ... void netlist_setup_t::connect_terminal_output(netlist_terminal_t &in, netlist_output_t &out) { - if (out.isFamily(netlist_terminal_t::ANALOG)) - { - /* no proxy needed, just merge existing terminal net */ - if (in.has_net()) - out.net().merge_net(&in.net()); - else - out.net().register_con(in); + if (out.isFamily(netlist_terminal_t::ANALOG)) + { + /* no proxy needed, just merge existing terminal net */ + if (in.has_net()) + out.net().merge_net(&in.net()); + else + out.net().register_con(in); - } - else if (out.isFamily(netlist_terminal_t::LOGIC)) - { - NL_VERBOSE_OUT(("connect_terminal_output: connecting proxy\n")); - nld_d_to_a_proxy *proxy = new nld_d_to_a_proxy(out); - pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt); - m_proxy_cnt++; + } + else if (out.isFamily(netlist_terminal_t::LOGIC)) + { + NL_VERBOSE_OUT(("connect_terminal_output: connecting proxy\n")); + nld_d_to_a_proxy *proxy = new nld_d_to_a_proxy(out); + pstring x = pstring::sprintf("proxy_da_%d", m_proxy_cnt); + m_proxy_cnt++; - proxy->init(netlist(), x); - register_dev(proxy, x); + proxy->init(netlist(), x); + register_dev(proxy, x); - out.net().register_con(proxy->m_I); + out.net().register_con(proxy->m_I); - if (in.has_net()) - proxy->m_Q.net().merge_net(&in.net()); - else - proxy->m_Q.net().register_con(in); - } - else - { - netlist().xfatalerror("Netlist: Severe Error"); - } + if (in.has_net()) + proxy->m_Q.net().merge_net(&in.net()); + else + proxy->m_Q.net().register_con(in); + } + else + { + netlist().xfatalerror("Netlist: Severe Error"); + } } void netlist_setup_t::connect_terminals(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2) { - //assert(in.isType(netlist_terminal_t::TERMINAL)); - //assert(out.isType(netlist_terminal_t::TERMINAL)); + //assert(in.isType(netlist_terminal_t::TERMINAL)); + //assert(out.isType(netlist_terminal_t::TERMINAL)); - if (t1.has_net() && t2.has_net()) - { - NL_VERBOSE_OUT(("T2 and T1 have net\n")); - t1.net().merge_net(&t2.net()); - } - else if (t2.has_net()) - { - NL_VERBOSE_OUT(("T2 has net\n")); - t2.net().register_con(t1); - } - else if (t1.has_net()) - { - NL_VERBOSE_OUT(("T1 has net\n")); - t1.net().register_con(t2); - } - else - { - NL_VERBOSE_OUT(("adding net ...\n")); - netlist_net_t *anet = new netlist_net_t(netlist_object_t::NET, netlist_object_t::ANALOG); - t1.set_net(*anet); - //m_netlist.solver()->m_nets.add(anet); - // FIXME: Nets should have a unique name - t1.net().init_object(netlist(),"net." + t1.name() ); - t1.net().register_con(t2); - t1.net().register_con(t1); - } + if (t1.has_net() && t2.has_net()) + { + NL_VERBOSE_OUT(("T2 and T1 have net\n")); + t1.net().merge_net(&t2.net()); + } + else if (t2.has_net()) + { + NL_VERBOSE_OUT(("T2 has net\n")); + t2.net().register_con(t1); + } + else if (t1.has_net()) + { + NL_VERBOSE_OUT(("T1 has net\n")); + t1.net().register_con(t2); + } + else + { + NL_VERBOSE_OUT(("adding net ...\n")); + netlist_net_t *anet = new netlist_net_t(netlist_object_t::NET, netlist_object_t::ANALOG); + t1.set_net(*anet); + //m_netlist.solver()->m_nets.add(anet); + // FIXME: Nets should have a unique name + t1.net().init_object(netlist(),"net." + t1.name() ); + t1.net().register_con(t2); + t1.net().register_con(t1); + } } void netlist_setup_t::connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2) { - NL_VERBOSE_OUT(("Connecting %s to %s\n", t1.name().cstr(), t2.name().cstr())); - // FIXME: amend device design so that warnings can be turned into errors - // Only variable inputs have this issue - if (t1.isType(netlist_core_terminal_t::OUTPUT) && t2.isType(netlist_core_terminal_t::INPUT)) - { - if (t2.has_net()) - NL_VERBOSE_OUT(("Input %s already connected\n", t2.name().cstr())); - connect_input_output(dynamic_cast(t2), dynamic_cast(t1)); - } - else if (t1.isType(netlist_core_terminal_t::INPUT) && t2.isType(netlist_core_terminal_t::OUTPUT)) - { - if (t1.has_net()) - NL_VERBOSE_OUT(("Input %s already connected\n", t1.name().cstr())); - connect_input_output(dynamic_cast(t1), dynamic_cast(t2)); - } - else if (t1.isType(netlist_core_terminal_t::OUTPUT) && t2.isType(netlist_core_terminal_t::TERMINAL)) - { - connect_terminal_output(dynamic_cast(t2), dynamic_cast(t1)); - } - else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::OUTPUT)) - { - connect_terminal_output(dynamic_cast(t1), dynamic_cast(t2)); - } - else if (t1.isType(netlist_core_terminal_t::INPUT) && t2.isType(netlist_core_terminal_t::TERMINAL)) - { - connect_terminal_input(dynamic_cast(t2), dynamic_cast(t1)); - } - else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::INPUT)) - { - connect_terminal_input(dynamic_cast(t1), dynamic_cast(t2)); - } - else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::TERMINAL)) - { - connect_terminals(dynamic_cast(t1), dynamic_cast(t2)); - } - else - netlist().xfatalerror("Connecting %s to %s not supported!\n", t1.name().cstr(), t2.name().cstr()); + NL_VERBOSE_OUT(("Connecting %s to %s\n", t1.name().cstr(), t2.name().cstr())); + // FIXME: amend device design so that warnings can be turned into errors + // Only variable inputs have this issue + if (t1.isType(netlist_core_terminal_t::OUTPUT) && t2.isType(netlist_core_terminal_t::INPUT)) + { + if (t2.has_net()) + NL_VERBOSE_OUT(("Input %s already connected\n", t2.name().cstr())); + connect_input_output(dynamic_cast(t2), dynamic_cast(t1)); + } + else if (t1.isType(netlist_core_terminal_t::INPUT) && t2.isType(netlist_core_terminal_t::OUTPUT)) + { + if (t1.has_net()) + NL_VERBOSE_OUT(("Input %s already connected\n", t1.name().cstr())); + connect_input_output(dynamic_cast(t1), dynamic_cast(t2)); + } + else if (t1.isType(netlist_core_terminal_t::OUTPUT) && t2.isType(netlist_core_terminal_t::TERMINAL)) + { + connect_terminal_output(dynamic_cast(t2), dynamic_cast(t1)); + } + else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::OUTPUT)) + { + connect_terminal_output(dynamic_cast(t1), dynamic_cast(t2)); + } + else if (t1.isType(netlist_core_terminal_t::INPUT) && t2.isType(netlist_core_terminal_t::TERMINAL)) + { + connect_terminal_input(dynamic_cast(t2), dynamic_cast(t1)); + } + else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::INPUT)) + { + connect_terminal_input(dynamic_cast(t1), dynamic_cast(t2)); + } + else if (t1.isType(netlist_core_terminal_t::TERMINAL) && t2.isType(netlist_core_terminal_t::TERMINAL)) + { + connect_terminals(dynamic_cast(t1), dynamic_cast(t2)); + } + else + netlist().xfatalerror("Connecting %s to %s not supported!\n", t1.name().cstr(), t2.name().cstr()); } void netlist_setup_t::resolve_inputs() { + NL_VERBOSE_OUT(("Resolving ...\n")); + for (tagmap_link_t::entry_t *entry = m_links.first(); entry != NULL; entry = m_links.next(entry)) + { + const pstring t1s = entry->object().e1; + const pstring t2s = entry->object().e2; + netlist_core_terminal_t *t1 = find_terminal(t1s); + netlist_core_terminal_t *t2 = find_terminal(t2s); - NL_VERBOSE_OUT(("Resolving ...\n")); - for (tagmap_link_t::entry_t *entry = m_links.first(); entry != NULL; entry = m_links.next(entry)) - { - const pstring t1s = entry->object().e1; - const pstring t2s = entry->object().e2; - netlist_core_terminal_t *t1 = find_terminal(t1s); - netlist_core_terminal_t *t2 = find_terminal(t2s); + connect(*t1, *t2); + } - connect(*t1, *t2); - } - - /* print all outputs */ - for (tagmap_terminal_t::entry_t *entry = m_terminals.first(); entry != NULL; entry = m_terminals.next(entry)) - { - ATTR_UNUSED netlist_output_t *out = dynamic_cast(entry->object()); - //if (out != NULL) - //VERBOSE_OUT(("%s %d\n", out->netdev()->name(), *out->Q_ptr())); - } + /* print all outputs */ + for (tagmap_terminal_t::entry_t *entry = m_terminals.first(); entry != NULL; entry = m_terminals.next(entry)) + { + ATTR_UNUSED netlist_output_t *out = dynamic_cast(entry->object()); + //if (out != NULL) + //VERBOSE_OUT(("%s %d\n", out->netdev()->name(), *out->Q_ptr())); + } #if 0 - NL_VERBOSE_OUT(("deleting empty nets ...\n")); + NL_VERBOSE_OUT(("deleting empty nets ...\n")); - // delete empty nets ... - for (netlist_net_t::list_t::entry_t *pn = netlist().m_nets.first(); pn != NULL; pn = netlist().m_nets.next(pn)) - { - if (pn->object()->m_head == NULL) - { - NL_VERBOSE_OUT(("Deleting net ...\n")); - netlist_net_t *to_delete = pn->object(); - netlist().m_nets.remove(to_delete); - if (!to_delete->isRailNet()) - delete to_delete; - pn--; - } - } + // delete empty nets ... + for (netlist_net_t::list_t::entry_t *pn = netlist().m_nets.first(); pn != NULL; pn = netlist().m_nets.next(pn)) + { + if (pn->object()->m_head == NULL) + { + NL_VERBOSE_OUT(("Deleting net ...\n")); + netlist_net_t *to_delete = pn->object(); + netlist().m_nets.remove(to_delete); + if (!to_delete->isRailNet()) + delete to_delete; + pn--; + } + } #endif - if (m_netlist.solver() != NULL) - m_netlist.solver()->post_start(); + if (m_netlist.solver() != NULL) + m_netlist.solver()->post_start(); } void netlist_setup_t::start_devices() { - - if (getenv("NL_LOGS")) - { - NL_VERBOSE_OUT(("Creating dynamic logs ...\n")); - nl_util::pstring_list ll = nl_util::split(getenv("NL_LOGS"), ":"); - for (int i=0; i < ll.count(); i++) - { - NL_VERBOSE_OUT(("%d: <%s>\n",i, ll[i].cstr())); - netlist_device_t *nc = factory().new_device_by_classname("nld_log", *this); - pstring name = "log_" + ll[i]; - register_dev(nc, name); - register_link(name + ".I", ll[i]); - } - } + if (getenv("NL_LOGS")) + { + NL_VERBOSE_OUT(("Creating dynamic logs ...\n")); + nl_util::pstring_list ll = nl_util::split(getenv("NL_LOGS"), ":"); + for (int i=0; i < ll.count(); i++) + { + NL_VERBOSE_OUT(("%d: <%s>\n",i, ll[i].cstr())); + netlist_device_t *nc = factory().new_device_by_classname("nld_log", *this); + pstring name = "log_" + ll[i]; + register_dev(nc, name); + register_link(name + ".I", ll[i]); + } + } - NL_VERBOSE_OUT(("Searching for mainclock and solver ...\n")); - /* find the main clock ... */ - for (tagmap_devices_t::entry_t *entry = netlist().m_devices.first(); entry != NULL; entry = netlist().m_devices.next(entry)) - { - netlist_device_t *dev = entry->object(); - if (dynamic_cast(dev) != NULL) - { - m_netlist.set_mainclock_dev(dynamic_cast(dev)); - } - if (dynamic_cast(dev) != NULL) - { - m_netlist.set_solver_dev(dynamic_cast(dev)); - } - } + NL_VERBOSE_OUT(("Searching for mainclock and solver ...\n")); + /* find the main clock ... */ + for (tagmap_devices_t::entry_t *entry = netlist().m_devices.first(); entry != NULL; entry = netlist().m_devices.next(entry)) + { + netlist_device_t *dev = entry->object(); + if (dynamic_cast(dev) != NULL) + { + m_netlist.set_mainclock_dev(dynamic_cast(dev)); + } + if (dynamic_cast(dev) != NULL) + { + m_netlist.set_solver_dev(dynamic_cast(dev)); + } + } - NL_VERBOSE_OUT(("Initializing devices ...\n")); - for (tagmap_devices_t::entry_t *entry = netlist().m_devices.first(); entry != NULL; entry = netlist().m_devices.next(entry)) - { - netlist_device_t *dev = entry->object(); - dev->init(netlist(), entry->tag().cstr()); - } + NL_VERBOSE_OUT(("Initializing devices ...\n")); + for (tagmap_devices_t::entry_t *entry = netlist().m_devices.first(); entry != NULL; entry = netlist().m_devices.next(entry)) + { + netlist_device_t *dev = entry->object(); + dev->init(netlist(), entry->tag().cstr()); + } } diff --git a/src/emu/netlist/nl_setup.h b/src/emu/netlist/nl_setup.h index 627a539dce..13d456b76e 100644 --- a/src/emu/netlist/nl_setup.h +++ b/src/emu/netlist/nl_setup.h @@ -19,7 +19,7 @@ #define NET_STR(_x) # _x #define NET_MODEL(_model) \ - netlist.register_model(_model); + netlist.register_model(_model); #define NET_ALIAS(_alias, _name) \ netlist.register_alias(# _alias, # _name); @@ -39,13 +39,13 @@ netlist.register_link(# _name "." # _input, # _output); #define NET_C(_input, _output) \ - netlist.register_link(NET_STR(_input) , NET_STR(_output)); + netlist.register_link(NET_STR(_input) , NET_STR(_output)); #define NETDEV_PARAM(_name, _val) \ netlist.register_param(# _name, _val); #define NETDEV_PARAMI(_name, _param, _val) \ - netlist.register_param(# _name "." # _param, _val); + netlist.register_param(# _name "." # _param, _val); #define NETLIST_NAME(_name) netlist ## _ ## _name @@ -69,30 +69,30 @@ ATTR_COLD void NETLIST_NAME(_name)(netlist_setup_t &netlist) \ class netlist_setup_t { - NETLIST_PREVENT_COPYING(netlist_setup_t) + NETLIST_PREVENT_COPYING(netlist_setup_t) public: - struct link_t - { - link_t() { } - // Copy constructor - link_t(const link_t &from) - { - e1 = from.e1; - e2 = from.e2; - } + struct link_t + { + link_t() { } + // Copy constructor + link_t(const link_t &from) + { + e1 = from.e1; + e2 = from.e2; + } - link_t(const pstring &ae1, const pstring &ae2) - { - e1 = ae1; - e2 = ae2; - } - pstring e1; - pstring e2; + link_t(const pstring &ae1, const pstring &ae2) + { + e1 = ae1; + e2 = ae2; + } + pstring e1; + pstring e2; - bool operator==(const link_t &rhs) const { return (e1 == rhs.e1) && (e2 == rhs.e2); } - link_t &operator=(const link_t &rhs) { e1 = rhs.e1; e2 = rhs.e2; return *this; } - }; + bool operator==(const link_t &rhs) const { return (e1 == rhs.e1) && (e2 == rhs.e2); } + link_t &operator=(const link_t &rhs) { e1 = rhs.e1; e2 = rhs.e2; return *this; } + }; typedef tagmap_t tagmap_nstring_t; typedef tagmap_t tagmap_param_t; @@ -105,29 +105,29 @@ public: void init(); netlist_base_t &netlist() { return m_netlist; } - const netlist_base_t &netlist() const { return m_netlist; } + const netlist_base_t &netlist() const { return m_netlist; } netlist_factory &factory() { return m_factory; } netlist_device_t *register_dev(netlist_device_t *dev, const pstring &name); void remove_dev(const pstring &name); - void register_model(const pstring &model); - void register_alias(const pstring &alias, const pstring &out); - void register_link(const pstring &sin, const pstring &sout); - void register_param(const pstring ¶m, const pstring &value); - void register_param(const pstring ¶m, const double value); + void register_model(const pstring &model); + void register_alias(const pstring &alias, const pstring &out); + void register_link(const pstring &sin, const pstring &sout); + void register_param(const pstring ¶m, const pstring &value); + void register_param(const pstring ¶m, const double value); - void register_object(netlist_device_t &dev, netlist_core_device_t &upd_dev, const pstring &name, netlist_object_t &obj, netlist_input_t::state_e state); - void connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2); + void register_object(netlist_device_t &dev, netlist_core_device_t &upd_dev, const pstring &name, netlist_object_t &obj, netlist_input_t::state_e state); + void connect(netlist_core_terminal_t &t1, netlist_core_terminal_t &t2); - netlist_core_terminal_t *find_terminal(const pstring &outname_in, bool required = true); - netlist_core_terminal_t *find_terminal(const pstring &outname_in, netlist_object_t::type_t atype, bool required = true); + netlist_core_terminal_t *find_terminal(const pstring &outname_in, bool required = true); + netlist_core_terminal_t *find_terminal(const pstring &outname_in, netlist_object_t::type_t atype, bool required = true); - netlist_param_t *find_param(const pstring ¶m_in, bool required = true); + netlist_param_t *find_param(const pstring ¶m_in, bool required = true); - void parse(const char *buf); + void parse(const char *buf); - void start_devices(); + void start_devices(); void resolve_inputs(); /* not ideal, but needed for save_state */ @@ -144,21 +144,21 @@ private: tagmap_nstring_t m_alias; tagmap_param_t m_params; tagmap_link_t m_links; - tagmap_nstring_t m_params_temp; + tagmap_nstring_t m_params_temp; - netlist_factory m_factory; + netlist_factory m_factory; - netlist_list_t m_models; + netlist_list_t m_models; int m_proxy_cnt; void connect_terminals(netlist_core_terminal_t &in, netlist_core_terminal_t &out); void connect_input_output(netlist_input_t &in, netlist_output_t &out); - void connect_terminal_output(netlist_terminal_t &in, netlist_output_t &out); - void connect_terminal_input(netlist_terminal_t &term, netlist_input_t &inp); + void connect_terminal_output(netlist_terminal_t &in, netlist_output_t &out); + void connect_terminal_input(netlist_terminal_t &term, netlist_input_t &inp); - // helpers - pstring objtype_as_astr(netlist_object_t &in); + // helpers + pstring objtype_as_astr(netlist_object_t &in); const pstring resolve_alias(const pstring &name) const; }; diff --git a/src/emu/netlist/nl_time.h b/src/emu/netlist/nl_time.h index bfdeda38c3..33729fb38d 100644 --- a/src/emu/netlist/nl_time.h +++ b/src/emu/netlist/nl_time.h @@ -26,87 +26,87 @@ struct netlist_time { public: - typedef UINT64 INTERNALTYPE; + typedef UINT64 INTERNALTYPE; - static const INTERNALTYPE RESOLUTION = NETLIST_INTERNAL_RES; + static const INTERNALTYPE RESOLUTION = NETLIST_INTERNAL_RES; - ATTR_HOT inline netlist_time() : m_time(0) {} + ATTR_HOT inline netlist_time() : m_time(0) {} - ATTR_HOT friend inline const netlist_time operator-(const netlist_time &left, const netlist_time &right); - ATTR_HOT friend inline const netlist_time operator+(const netlist_time &left, const netlist_time &right); - ATTR_HOT friend inline const netlist_time operator*(const netlist_time &left, const UINT32 factor); - ATTR_HOT friend inline const UINT32 operator/(const netlist_time &left, const netlist_time &right); - ATTR_HOT friend inline bool operator>(const netlist_time &left, const netlist_time &right); - ATTR_HOT friend inline bool operator<(const netlist_time &left, const netlist_time &right); - ATTR_HOT friend inline bool operator>=(const netlist_time &left, const netlist_time &right); - ATTR_HOT friend inline bool operator<=(const netlist_time &left, const netlist_time &right); + ATTR_HOT friend inline const netlist_time operator-(const netlist_time &left, const netlist_time &right); + ATTR_HOT friend inline const netlist_time operator+(const netlist_time &left, const netlist_time &right); + ATTR_HOT friend inline const netlist_time operator*(const netlist_time &left, const UINT32 factor); + ATTR_HOT friend inline const UINT32 operator/(const netlist_time &left, const netlist_time &right); + ATTR_HOT friend inline bool operator>(const netlist_time &left, const netlist_time &right); + ATTR_HOT friend inline bool operator<(const netlist_time &left, const netlist_time &right); + ATTR_HOT friend inline bool operator>=(const netlist_time &left, const netlist_time &right); + ATTR_HOT friend inline bool operator<=(const netlist_time &left, const netlist_time &right); - ATTR_HOT inline const netlist_time &operator=(const netlist_time &right) { m_time = right.m_time; return *this; } - ATTR_HOT inline const netlist_time &operator=(const double &right) { m_time = (INTERNALTYPE) ( right * (double) RESOLUTION); return *this; } - ATTR_HOT inline operator double() const { return as_double(); } + ATTR_HOT inline const netlist_time &operator=(const netlist_time &right) { m_time = right.m_time; return *this; } + ATTR_HOT inline const netlist_time &operator=(const double &right) { m_time = (INTERNALTYPE) ( right * (double) RESOLUTION); return *this; } + ATTR_HOT inline operator double() const { return as_double(); } - ATTR_HOT inline const netlist_time &operator+=(const netlist_time &right) { m_time += right.m_time; return *this; } + ATTR_HOT inline const netlist_time &operator+=(const netlist_time &right) { m_time += right.m_time; return *this; } - ATTR_HOT inline const INTERNALTYPE as_raw() const { return m_time; } - ATTR_HOT inline const double as_double() const { return (double) m_time / (double) RESOLUTION; } + ATTR_HOT inline const INTERNALTYPE as_raw() const { return m_time; } + ATTR_HOT inline const double as_double() const { return (double) m_time / (double) RESOLUTION; } - // for save states .... - ATTR_HOT inline INTERNALTYPE *get_internaltype_ptr() { return &m_time; } + // for save states .... + ATTR_HOT inline INTERNALTYPE *get_internaltype_ptr() { return &m_time; } - ATTR_HOT static inline const netlist_time from_nsec(const int ns) { return netlist_time((UINT64) ns * (RESOLUTION / U64(1000000000))); } - ATTR_HOT static inline const netlist_time from_usec(const int us) { return netlist_time((UINT64) us * (RESOLUTION / U64(1000000))); } - ATTR_HOT static inline const netlist_time from_msec(const int ms) { return netlist_time((UINT64) ms * (RESOLUTION / U64(1000))); } - ATTR_HOT static inline const netlist_time from_hz(const UINT64 hz) { return netlist_time(RESOLUTION / hz); } - ATTR_HOT static inline const netlist_time from_double(const double t) { return netlist_time((INTERNALTYPE) ( t * (double) RESOLUTION)); } - ATTR_HOT static inline const netlist_time from_raw(const INTERNALTYPE raw) { return netlist_time(raw); } + ATTR_HOT static inline const netlist_time from_nsec(const int ns) { return netlist_time((UINT64) ns * (RESOLUTION / U64(1000000000))); } + ATTR_HOT static inline const netlist_time from_usec(const int us) { return netlist_time((UINT64) us * (RESOLUTION / U64(1000000))); } + ATTR_HOT static inline const netlist_time from_msec(const int ms) { return netlist_time((UINT64) ms * (RESOLUTION / U64(1000))); } + ATTR_HOT static inline const netlist_time from_hz(const UINT64 hz) { return netlist_time(RESOLUTION / hz); } + ATTR_HOT static inline const netlist_time from_double(const double t) { return netlist_time((INTERNALTYPE) ( t * (double) RESOLUTION)); } + ATTR_HOT static inline const netlist_time from_raw(const INTERNALTYPE raw) { return netlist_time(raw); } - static const netlist_time zero; + static const netlist_time zero; protected: - ATTR_HOT inline netlist_time(const INTERNALTYPE val) : m_time(val) {} + ATTR_HOT inline netlist_time(const INTERNALTYPE val) : m_time(val) {} - INTERNALTYPE m_time; + INTERNALTYPE m_time; }; ATTR_HOT inline const netlist_time operator-(const netlist_time &left, const netlist_time &right) { - return netlist_time::from_raw(left.m_time - right.m_time); + return netlist_time::from_raw(left.m_time - right.m_time); } ATTR_HOT inline const netlist_time operator*(const netlist_time &left, const UINT32 factor) { - return netlist_time::from_raw(left.m_time * factor); + return netlist_time::from_raw(left.m_time * factor); } ATTR_HOT inline const UINT32 operator/(const netlist_time &left, const netlist_time &right) { - return left.m_time / right.m_time; + return left.m_time / right.m_time; } ATTR_HOT inline const netlist_time operator+(const netlist_time &left, const netlist_time &right) { - return netlist_time::from_raw(left.m_time + right.m_time); + return netlist_time::from_raw(left.m_time + right.m_time); } ATTR_HOT inline bool operator<(const netlist_time &left, const netlist_time &right) { - return (left.m_time < right.m_time); + return (left.m_time < right.m_time); } ATTR_HOT inline bool operator>(const netlist_time &left, const netlist_time &right) { - return (left.m_time > right.m_time); + return (left.m_time > right.m_time); } ATTR_HOT inline bool operator<=(const netlist_time &left, const netlist_time &right) { - return (left.m_time <= right.m_time); + return (left.m_time <= right.m_time); } ATTR_HOT inline bool operator>=(const netlist_time &left, const netlist_time &right) { - return (left.m_time >= right.m_time); + return (left.m_time >= right.m_time); } diff --git a/src/emu/netlist/nl_util.h b/src/emu/netlist/nl_util.h index 5016befe09..17c467752a 100644 --- a/src/emu/netlist/nl_util.h +++ b/src/emu/netlist/nl_util.h @@ -13,29 +13,29 @@ class nl_util { // this is purely static private: - nl_util() {}; + nl_util() {}; public: - typedef netlist_list_t pstring_list; + typedef netlist_list_t pstring_list; - static pstring_list split(const pstring &str, const pstring &onstr) - { - pstring_list temp; + static pstring_list split(const pstring &str, const pstring &onstr) + { + pstring_list temp; - int p = 0; - int pn; + int p = 0; + int pn; - pn = str.find(onstr, p); - while (pn>=0) - { - temp.add(str.substr(p, pn - p)); - p = pn + onstr.len(); - pn = str.find(onstr, p); - } - if (p=0) + { + temp.add(str.substr(p, pn - p)); + p = pn + onstr.len(); + pn = str.find(onstr, p); + } + if (p %s(%d) %p\n", fullname.cstr(), ts[dt].cstr(), size, ptr)); - pstate_entry_t *p = new pstate_entry_t(stname, dt, size, count, ptr); - m_save.add(p); + NL_VERBOSE_OUT(("SAVE: <%s> %s(%d) %p\n", fullname.cstr(), ts[dt].cstr(), size, ptr)); + pstate_entry_t *p = new pstate_entry_t(stname, dt, size, count, ptr); + m_save.add(p); } diff --git a/src/emu/netlist/pstate.h b/src/emu/netlist/pstate.h index e5432f523b..3c0b1eeaeb 100644 --- a/src/emu/netlist/pstate.h +++ b/src/emu/netlist/pstate.h @@ -16,18 +16,18 @@ // ---------------------------------------------------------------------------------------- #define PSTATE_INTERFACE(manager, module) \ - template ATTR_COLD void save(C &state, const pstring &stname) \ - { \ - dynamic_cast(manager).save_manager(state, module + "." + stname); \ - } + template ATTR_COLD void save(C &state, const pstring &stname) \ + { \ + dynamic_cast(manager).save_manager(state, module + "." + stname); \ + } enum netlist_data_type_e { - NOT_SUPPORTED, - DT_DOUBLE, - DT_INT64, - DT_INT8, - DT_INT, - DT_BOOLEAN + NOT_SUPPORTED, + DT_DOUBLE, + DT_INT64, + DT_INT8, + DT_INT, + DT_BOOLEAN }; template struct nl_datatype { static const netlist_data_type_e type = netlist_data_type_e(NOT_SUPPORTED); }; @@ -46,50 +46,50 @@ NETLIST_SAVE_TYPE(INT32, DT_INT); struct pstate_entry_t { - typedef netlist_list_t list_t; + typedef netlist_list_t list_t; - pstate_entry_t(const pstring &stname, const netlist_data_type_e dt, const int size, const int count, void *ptr) : - m_name(stname), m_dt(dt), m_size(size), m_count(count), m_ptr(ptr) { } - pstring m_name; - netlist_data_type_e m_dt; - int m_size; - int m_count; - void *m_ptr; + pstate_entry_t(const pstring &stname, const netlist_data_type_e dt, const int size, const int count, void *ptr) : + m_name(stname), m_dt(dt), m_size(size), m_count(count), m_ptr(ptr) { } + pstring m_name; + netlist_data_type_e m_dt; + int m_size; + int m_count; + void *m_ptr; }; class pstate_manager_t { public: - ATTR_COLD ~pstate_manager_t(); + ATTR_COLD ~pstate_manager_t(); - template ATTR_COLD void save_manager(C &state, const pstring &stname) - { - save_state_ptr(stname, nl_datatype::type, sizeof(C), 1, &state); - } + template ATTR_COLD void save_manager(C &state, const pstring &stname) + { + save_state_ptr(stname, nl_datatype::type, sizeof(C), 1, &state); + } - template ATTR_COLD void save_manager(C *state, const pstring &stname, const int count) - { - save_state_ptr(stname, nl_datatype::type, sizeof(C), count, state); - } + template ATTR_COLD void save_manager(C *state, const pstring &stname, const int count) + { + save_state_ptr(stname, nl_datatype::type, sizeof(C), count, state); + } - template ATTR_COLD void save_manager(C (&state)[N], const pstring &stname) - { - save_state_ptr(stname, nl_datatype::type, sizeof(C), N, &(state[0])); - } + template ATTR_COLD void save_manager(C (&state)[N], const pstring &stname) + { + save_state_ptr(stname, nl_datatype::type, sizeof(C), N, &(state[0])); + } - inline const pstate_entry_t::list_t &save_list() const { return m_save; } + inline const pstate_entry_t::list_t &save_list() const { return m_save; } protected: - ATTR_COLD void save_state_ptr(const pstring &stname, const netlist_data_type_e, const int size, const int count, void *ptr); + ATTR_COLD void save_state_ptr(const pstring &stname, const netlist_data_type_e, const int size, const int count, void *ptr); private: - pstate_entry_t::list_t m_save; + pstate_entry_t::list_t m_save; }; template<> ATTR_COLD inline void pstate_manager_t::save_manager(netlist_time &nlt, const pstring &stname) { - save_state_ptr(stname, DT_INT64, sizeof(netlist_time::INTERNALTYPE), 1, nlt.get_internaltype_ptr()); + save_state_ptr(stname, DT_INT64, sizeof(netlist_time::INTERNALTYPE), 1, nlt.get_internaltype_ptr()); } diff --git a/src/emu/netlist/pstring.c b/src/emu/netlist/pstring.c index 7d5a55ff16..6287fac810 100644 --- a/src/emu/netlist/pstring.c +++ b/src/emu/netlist/pstring.c @@ -24,68 +24,68 @@ pstring::str_t *pstring::m_zero = NULL; //#define DEBUG_MODE (0) #ifdef MAME_DEBUG - #ifndef IMMEDIATE_MODE - #define IMMEDIATE_MODE (0) - #endif - #ifndef DEBUG_MODE - #define DEBUG_MODE (1) - #endif + #ifndef IMMEDIATE_MODE + #define IMMEDIATE_MODE (0) + #endif + #ifndef DEBUG_MODE + #define DEBUG_MODE (1) + #endif #else - #ifndef IMMEDIATE_MODE - #define IMMEDIATE_MODE (1) - #endif - #ifndef DEBUG_MODE - #define DEBUG_MODE (0) - #endif + #ifndef IMMEDIATE_MODE + #define IMMEDIATE_MODE (1) + #endif + #ifndef DEBUG_MODE + #define DEBUG_MODE (0) + #endif #endif pstring::~pstring() { - sfree(m_ptr); + sfree(m_ptr); } void pstring::pcat(const char *s) { - int slen = strlen(s); - str_t *n = salloc(m_ptr->len() + slen); - if (m_ptr->len() > 0) - memcpy(n->str(), m_ptr->str(), m_ptr->len()); - if (slen > 0) - memcpy(n->str() + m_ptr->len(), s, slen); - *(n->str() + n->len()) = 0; - sfree(m_ptr); - m_ptr = n; + int slen = strlen(s); + str_t *n = salloc(m_ptr->len() + slen); + if (m_ptr->len() > 0) + memcpy(n->str(), m_ptr->str(), m_ptr->len()); + if (slen > 0) + memcpy(n->str() + m_ptr->len(), s, slen); + *(n->str() + n->len()) = 0; + sfree(m_ptr); + m_ptr = n; } void pstring::pcopy(const char *from, int size) { - str_t *n = salloc(size); - if (size > 0) - memcpy(n->str(), from, size); - *(n->str() + size) = 0; - sfree(m_ptr); - m_ptr = n; + str_t *n = salloc(size); + if (size > 0) + memcpy(n->str(), from, size); + *(n->str() + size) = 0; + sfree(m_ptr); + m_ptr = n; } pstring pstring::substr(unsigned int start, int count) const { - int alen = len(); - if (start >= alen) - return pstring(); - if (count <0 || start + count > alen) - count = alen - start; - pstring ret; - ret.pcopy(cstr() + start, count); - return ret; + int alen = len(); + if (start >= alen) + return pstring(); + if (count <0 || start + count > alen) + count = alen - start; + pstring ret; + ret.pcopy(cstr() + start, count); + return ret; } pstring pstring::ucase() const { - pstring ret = *this; - ret.pcopy(cstr(), len()); - for (int i=0; im_str[i] = toupper((unsigned) ret.m_ptr->m_str[i]); - return ret; + pstring ret = *this; + ret.pcopy(cstr(), len()); + for (int i=0; im_str[i] = toupper((unsigned) ret.m_ptr->m_str[i]); + return ret; } //------------------------------------------------- @@ -94,58 +94,58 @@ pstring pstring::ucase() const int pstring::pcmpi(const char *lhs, const char *rhs, int count) const { - // loop while equal until we hit the end of strings - int index; - for (index = 0; index < count; index++) - if (lhs[index] == 0 || tolower(lhs[index]) != tolower(rhs[index])) - break; + // loop while equal until we hit the end of strings + int index; + for (index = 0; index < count; index++) + if (lhs[index] == 0 || tolower(lhs[index]) != tolower(rhs[index])) + break; - // determine the final result - if (index < count) - return tolower(lhs[index]) - tolower(rhs[index]); - if (lhs[index] == 0) - return 0; - return 1; + // determine the final result + if (index < count) + return tolower(lhs[index]) - tolower(rhs[index]); + if (lhs[index] == 0) + return 0; + return 1; } double pstring::as_double(bool *error) const { - double ret; - char *e = NULL; + double ret; + char *e = NULL; - if (error != NULL) - *error = false; - ret = strtod(cstr(), &e); - if (*e != 0) - if (error != NULL) - *error = true; - return ret; + if (error != NULL) + *error = false; + ret = strtod(cstr(), &e); + if (*e != 0) + if (error != NULL) + *error = true; + return ret; } long pstring::as_long(bool *error) const { - double ret; - char *e = NULL; + double ret; + char *e = NULL; - if (error != NULL) - *error = false; - if (startsWith("0x")) - ret = strtol(&(cstr()[2]), &e, 16); - else - ret = strtol(cstr(), &e, 10); - if (*e != 0) - if (error != NULL) - *error = true; - return ret; + if (error != NULL) + *error = false; + if (startsWith("0x")) + ret = strtol(&(cstr()[2]), &e, 16); + else + ret = strtol(cstr(), &e, 10); + if (*e != 0) + if (error != NULL) + *error = true; + return ret; } pstring pstring::vprintf(va_list args) const { - // sprintf into the temporary buffer - char tempbuf[4096]; - vsprintf(tempbuf, cstr(), args); + // sprintf into the temporary buffer + char tempbuf[4096]; + vsprintf(tempbuf, cstr(), args); - return pstring(tempbuf); + return pstring(tempbuf); } // ---------------------------------------------------------------------------------------- @@ -154,35 +154,35 @@ pstring pstring::vprintf(va_list args) const void pstring::sfree(str_t *s) { - s->m_ref_count--; - if (s->m_ref_count == 0) - m_pool.dealloc(s); + s->m_ref_count--; + if (s->m_ref_count == 0) + m_pool.dealloc(s); } pstring::str_t *pstring::salloc(int n) { - str_t *ret = new(m_pool, n+1) str_t(n); - return ret; + str_t *ret = new(m_pool, n+1) str_t(n); + return ret; } pstring pstring::sprintf(const char *format, ...) { - va_list ap; - va_start(ap, format); - pstring ret = pstring(format).vprintf(ap); - va_end(ap); - return ret; + va_list ap; + va_start(ap, format); + pstring ret = pstring(format).vprintf(ap); + va_end(ap); + return ret; } void pstring::resetmem() { - // Release the 0 string - if (m_zero != NULL) - sfree(m_zero); - m_zero = NULL; - m_pool.m_shutdown = true; - m_pool.resetmem(); + // Release the 0 string + if (m_zero != NULL) + sfree(m_zero); + m_zero = NULL; + m_pool.m_shutdown = true; + m_pool.resetmem(); } // ---------------------------------------------------------------------------------------- @@ -191,10 +191,10 @@ void pstring::resetmem() pblockpool::pblockpool() - : m_shutdown(false) - , m_first(NULL) - , m_blocksize((DEBUG_MODE) ? 16384 : 16384) - , m_align(8) + : m_shutdown(false) + , m_first(NULL) + , m_blocksize((DEBUG_MODE) ? 16384 : 16384) + , m_align(8) { } @@ -205,105 +205,105 @@ pblockpool::~pblockpool() void *pblockpool::alloc(const std::size_t n) { - if (IMMEDIATE_MODE) - return (char *) malloc(n); - else - { - int memsize = ((n + m_align - 1) / m_align) * m_align; - int min_alloc = MAX(m_blocksize, memsize+sizeof(memblock)-MINDATASIZE); - char *ret = NULL; - //std::printf("m_first %p\n", m_first); - for (memblock *p = m_first; p != NULL && ret == NULL; p = p->next) - { - if (p->remaining > memsize) - { - ret = p->cur; - p->cur += memsize; - p->allocated += 1; - p->remaining -= memsize; - } - } + if (IMMEDIATE_MODE) + return (char *) malloc(n); + else + { + int memsize = ((n + m_align - 1) / m_align) * m_align; + int min_alloc = MAX(m_blocksize, memsize+sizeof(memblock)-MINDATASIZE); + char *ret = NULL; + //std::printf("m_first %p\n", m_first); + for (memblock *p = m_first; p != NULL && ret == NULL; p = p->next) + { + if (p->remaining > memsize) + { + ret = p->cur; + p->cur += memsize; + p->allocated += 1; + p->remaining -= memsize; + } + } - if (ret == NULL) - { - // need to allocate a new block - memblock *p = (memblock *) malloc(min_alloc); //new char[min_alloc]; - p->allocated = 0; - p->cur = &p->data[0]; - p->size = p->remaining = min_alloc - (sizeof(memblock)-MINDATASIZE); - p->next = m_first; - //std::printf("allocated block size %d\n", sizeof(p->data)); + if (ret == NULL) + { + // need to allocate a new block + memblock *p = (memblock *) malloc(min_alloc); //new char[min_alloc]; + p->allocated = 0; + p->cur = &p->data[0]; + p->size = p->remaining = min_alloc - (sizeof(memblock)-MINDATASIZE); + p->next = m_first; + //std::printf("allocated block size %d\n", sizeof(p->data)); - ret = p->cur; - p->cur += memsize; - p->allocated += 1; - p->remaining -= memsize; + ret = p->cur; + p->cur += memsize; + p->allocated += 1; + p->remaining -= memsize; - m_first = p; - } + m_first = p; + } - return ret; - } + return ret; + } } void pblockpool::dealloc(void *ptr) { - if (IMMEDIATE_MODE) - free(ptr); - else - { - for (memblock *p = m_first; p != NULL; p = p->next) - { - if (ptr >= &p->data[0] && ptr < &p->data[p->size]) - { - p->allocated -= 1; - if (p->allocated < 0) - std::fprintf(stderr, "nstring: memory corruption - crash likely\n"); - if (p->allocated == 0) - { - //std::printf("Block entirely freed\n"); - p->remaining = p->size; - p->cur = &p->data[0]; - } - // shutting down ? - if (m_shutdown) - resetmem(); // try to free blocks - return; - } - } - std::fprintf(stderr, "nstring: string <%p> not found on free\n", ptr); - } + if (IMMEDIATE_MODE) + free(ptr); + else + { + for (memblock *p = m_first; p != NULL; p = p->next) + { + if (ptr >= &p->data[0] && ptr < &p->data[p->size]) + { + p->allocated -= 1; + if (p->allocated < 0) + std::fprintf(stderr, "nstring: memory corruption - crash likely\n"); + if (p->allocated == 0) + { + //std::printf("Block entirely freed\n"); + p->remaining = p->size; + p->cur = &p->data[0]; + } + // shutting down ? + if (m_shutdown) + resetmem(); // try to free blocks + return; + } + } + std::fprintf(stderr, "nstring: string <%p> not found on free\n", ptr); + } } void pblockpool::resetmem() { - if (!IMMEDIATE_MODE) - { - memblock **p = &m_first; - int totalblocks = 0; - int freedblocks = 0; + if (!IMMEDIATE_MODE) + { + memblock **p = &m_first; + int totalblocks = 0; + int freedblocks = 0; - while (*p != NULL) - { - totalblocks++; - memblock **next = &((*p)->next); - if ((*p)->allocated == 0) - { - //std::printf("freeing block %p\n", *p); - memblock *freeme = *p; - *p = *next; - free(freeme); //delete[] *p; - freedblocks++; - } - else - { - //if (DEBUG_MODE) - // std::printf("Allocated: <%s>\n", ((str_t *)(&(*p)->data[0]))->str()); + while (*p != NULL) + { + totalblocks++; + memblock **next = &((*p)->next); + if ((*p)->allocated == 0) + { + //std::printf("freeing block %p\n", *p); + memblock *freeme = *p; + *p = *next; + free(freeme); //delete[] *p; + freedblocks++; + } + else + { + //if (DEBUG_MODE) + // std::printf("Allocated: <%s>\n", ((str_t *)(&(*p)->data[0]))->str()); - p = next; - } - } - if (DEBUG_MODE) - std::printf("Freed %d out of total %d blocks\n", freedblocks, totalblocks); - } + p = next; + } + } + if (DEBUG_MODE) + std::printf("Freed %d out of total %d blocks\n", freedblocks, totalblocks); + } } diff --git a/src/emu/netlist/pstring.h b/src/emu/netlist/pstring.h index 892ade87ef..f4b1dd5078 100644 --- a/src/emu/netlist/pstring.h +++ b/src/emu/netlist/pstring.h @@ -15,56 +15,56 @@ // ---------------------------------------------------------------------------------------- struct pblockpool { - NETLIST_PREVENT_COPYING(pblockpool) + NETLIST_PREVENT_COPYING(pblockpool) public: - static const int MINDATASIZE = 8; + static const int MINDATASIZE = 8; - pblockpool(); - ~pblockpool(); + pblockpool(); + ~pblockpool(); - void resetmem(); + void resetmem(); - void *alloc(std::size_t n); - void dealloc(void *ptr); + void *alloc(std::size_t n); + void dealloc(void *ptr); - template - void destroy(T* object) - { - object->~T(); - dealloc(object); - } - bool m_shutdown; + template + void destroy(T* object) + { + object->~T(); + dealloc(object); + } + bool m_shutdown; private: - struct memblock - { - memblock *next; - int size; - int allocated; - int remaining; - char *cur; - char data[MINDATASIZE]; - }; + struct memblock + { + memblock *next; + int size; + int allocated; + int remaining; + char *cur; + char data[MINDATASIZE]; + }; - memblock *m_first; - int m_blocksize; - int m_align; + memblock *m_first; + int m_blocksize; + int m_align; }; /* objects must be destroyed using destroy above */ inline void *operator new(std::size_t size, pblockpool &pool, int extra = 0) throw (std::bad_alloc) { - void *result = pool.alloc(size + extra); - //std::printf("allocating %ld + %d\n", size, extra); - if (result == NULL) - throw std::bad_alloc(); - return result; + void *result = pool.alloc(size + extra); + //std::printf("allocating %ld + %d\n", size, extra); + if (result == NULL) + throw std::bad_alloc(); + return result; } inline void operator delete(void *pMem, pblockpool &pool, int extra) { - pool.dealloc(pMem); + pool.dealloc(pMem); } // ---------------------------------------------------------------------------------------- @@ -77,158 +77,157 @@ inline void operator delete(void *pMem, pblockpool &pool, int extra) struct pstring { public: - // simple construction/destruction - pstring() - { - init(); - } - ~pstring(); + // simple construction/destruction + pstring() + { + init(); + } + ~pstring(); - // construction with copy - pstring(const char *string) {init(); if (string != NULL && *string != 0) pcopy(string); } - pstring(const pstring &string) {init(); pcopy(string); } + // construction with copy + pstring(const char *string) {init(); if (string != NULL && *string != 0) pcopy(string); } + pstring(const pstring &string) {init(); pcopy(string); } - // assignment operators - pstring &operator=(const char *string) { pcopy(string); return *this; } - pstring &operator=(const pstring &string) { pcopy(string); return *this; } + // assignment operators + pstring &operator=(const char *string) { pcopy(string); return *this; } + pstring &operator=(const pstring &string) { pcopy(string); return *this; } - // C string conversion operators and helpers - operator const char *() const { return m_ptr->str(); } - inline const char *cstr() const { return m_ptr->str(); } + // C string conversion operators and helpers + operator const char *() const { return m_ptr->str(); } + inline const char *cstr() const { return m_ptr->str(); } - // concatenation operators - pstring& operator+=(const pstring &string) { pcat(string.cstr()); return *this; } - friend pstring operator+(const pstring &lhs, const pstring &rhs) { return pstring(lhs) += rhs; } - friend pstring operator+(const pstring &lhs, const char *rhs) { return pstring(lhs) += rhs; } - friend pstring operator+(const char *lhs, const pstring &rhs) { return pstring(lhs) += rhs; } + // concatenation operators + pstring& operator+=(const pstring &string) { pcat(string.cstr()); return *this; } + friend pstring operator+(const pstring &lhs, const pstring &rhs) { return pstring(lhs) += rhs; } + friend pstring operator+(const pstring &lhs, const char *rhs) { return pstring(lhs) += rhs; } + friend pstring operator+(const char *lhs, const pstring &rhs) { return pstring(lhs) += rhs; } - // comparison operators - bool operator==(const char *string) const { return (pcmp(string) == 0); } - bool operator==(const pstring &string) const { return (pcmp(string.cstr()) == 0); } - bool operator!=(const char *string) const { return (pcmp(string) != 0); } - bool operator!=(const pstring &string) const { return (pcmp(string.cstr()) != 0); } - bool operator<(const char *string) const { return (pcmp(string) < 0); } - bool operator<(const pstring &string) const { return (pcmp(string.cstr()) < 0); } - bool operator<=(const char *string) const { return (pcmp(string) <= 0); } - bool operator<=(const pstring &string) const { return (pcmp(string.cstr()) <= 0); } - bool operator>(const char *string) const { return (pcmp(string) > 0); } - bool operator>(const pstring &string) const { return (pcmp(string.cstr()) > 0); } - bool operator>=(const char *string) const { return (pcmp(string) >= 0); } - bool operator>=(const pstring &string) const { return (pcmp(string.cstr()) >= 0); } + // comparison operators + bool operator==(const char *string) const { return (pcmp(string) == 0); } + bool operator==(const pstring &string) const { return (pcmp(string.cstr()) == 0); } + bool operator!=(const char *string) const { return (pcmp(string) != 0); } + bool operator!=(const pstring &string) const { return (pcmp(string.cstr()) != 0); } + bool operator<(const char *string) const { return (pcmp(string) < 0); } + bool operator<(const pstring &string) const { return (pcmp(string.cstr()) < 0); } + bool operator<=(const char *string) const { return (pcmp(string) <= 0); } + bool operator<=(const pstring &string) const { return (pcmp(string.cstr()) <= 0); } + bool operator>(const char *string) const { return (pcmp(string) > 0); } + bool operator>(const pstring &string) const { return (pcmp(string.cstr()) > 0); } + bool operator>=(const char *string) const { return (pcmp(string) >= 0); } + bool operator>=(const pstring &string) const { return (pcmp(string.cstr()) >= 0); } - // - inline int len() const { return m_ptr->len(); } + // + inline int len() const { return m_ptr->len(); } - inline bool equals(const pstring &string) { return (pcmp(string.cstr(), m_ptr->str()) == 0); } - inline bool iequals(const pstring &string) { return (pcmpi(string.cstr(), m_ptr->str()) == 0); } + inline bool equals(const pstring &string) { return (pcmp(string.cstr(), m_ptr->str()) == 0); } + inline bool iequals(const pstring &string) { return (pcmpi(string.cstr(), m_ptr->str()) == 0); } - inline int cmp(const pstring &string) const { return pcmp(string.cstr()); } - inline int cmpi(const pstring &string) const { return pcmpi(cstr(), string.cstr()); } + inline int cmp(const pstring &string) const { return pcmp(string.cstr()); } + inline int cmpi(const pstring &string) const { return pcmpi(cstr(), string.cstr()); } - inline int find(const char *search, int start = 0) const - { - int alen = len(); - const char *result = strstr(cstr() + MIN(start, alen), search); - return (result != NULL) ? (result - cstr()) : -1; - } + inline int find(const char *search, int start = 0) const + { + int alen = len(); + const char *result = strstr(cstr() + MIN(start, alen), search); + return (result != NULL) ? (result - cstr()) : -1; + } - // various + // various - inline bool startsWith(const pstring &arg) const { return (pcmp(cstr(), arg.cstr(), arg.len()) == 0); } - inline bool startsWith(const char *arg) const { return (pcmp(cstr(), arg, strlen(arg)) == 0); } + inline bool startsWith(const pstring &arg) const { return (pcmp(cstr(), arg.cstr(), arg.len()) == 0); } + inline bool startsWith(const char *arg) const { return (pcmp(cstr(), arg, strlen(arg)) == 0); } - // these return nstring ... - inline pstring cat(const pstring &s) const { return *this + s; } - inline pstring cat(const char *s) const { return *this + s; } + // these return nstring ... + inline pstring cat(const pstring &s) const { return *this + s; } + inline pstring cat(const char *s) const { return *this + s; } - pstring substr(unsigned int start, int count = -1) const ; + pstring substr(unsigned int start, int count = -1) const ; - inline pstring left(unsigned int count) const { return substr(0, count); } - inline pstring right(unsigned int count) const { return substr(len() - count, count); } + inline pstring left(unsigned int count) const { return substr(0, count); } + inline pstring right(unsigned int count) const { return substr(len() - count, count); } - pstring ucase() const; + pstring ucase() const; - // conversions + // conversions - double as_double(bool *error = NULL) const; + double as_double(bool *error = NULL) const; - long as_long(bool *error = NULL) const; + long as_long(bool *error = NULL) const; - // printf using string as format ... + // printf using string as format ... - pstring vprintf(va_list args) const; + pstring vprintf(va_list args) const; - // static - static pstring sprintf(const char *format, ...); - static void resetmem(); + // static + static pstring sprintf(const char *format, ...); + static void resetmem(); protected: - struct str_t - { - str_t(int alen) : m_ref_count(1), m_len(alen) { m_str[0] = 0; } + struct str_t + { + str_t(int alen) : m_ref_count(1), m_len(alen) { m_str[0] = 0; } - char *str() { return &m_str[0]; } - int len() { return m_len; } - //private: - int m_ref_count; - int m_len; - char m_str[1]; - }; + char *str() { return &m_str[0]; } + int len() { return m_len; } + //private: + int m_ref_count; + int m_len; + char m_str[1]; + }; - str_t *m_ptr; + str_t *m_ptr; - static pblockpool m_pool; + static pblockpool m_pool; private: - inline void init() - { - if (m_zero == NULL) - { - m_zero = new(pstring::m_pool, 0) pstring::str_t(0); - } - m_ptr = m_zero; - m_ptr->m_ref_count++; - } + inline void init() + { + if (m_zero == NULL) + { + m_zero = new(pstring::m_pool, 0) pstring::str_t(0); + } + m_ptr = m_zero; + m_ptr->m_ref_count++; + } - inline int pcmp(const char *right) const - { - return pcmp(m_ptr->str(), right); - } + inline int pcmp(const char *right) const + { + return pcmp(m_ptr->str(), right); + } - inline int pcmp(const char *left, const char *right, int count = -1) const - { - if (count < 0) - return strcmp(left, right); - else - return strncmp(left, right, count); - } + inline int pcmp(const char *left, const char *right, int count = -1) const + { + if (count < 0) + return strcmp(left, right); + else + return strncmp(left, right, count); + } - int pcmpi(const char *lhs, const char *rhs, int count = -1) const; + int pcmpi(const char *lhs, const char *rhs, int count = -1) const; - void pcopy(const char *from, int size); + void pcopy(const char *from, int size); - inline void pcopy(const char *from) - { - pcopy(from, strlen(from)); - } + inline void pcopy(const char *from) + { + pcopy(from, strlen(from)); + } - inline void pcopy(const pstring &from) - { - sfree(m_ptr); - m_ptr = from.m_ptr; - m_ptr->m_ref_count++; - } + inline void pcopy(const pstring &from) + { + sfree(m_ptr); + m_ptr = from.m_ptr; + m_ptr->m_ref_count++; + } - void pcat(const char *s); + void pcat(const char *s); - static str_t *salloc(int n); - static void sfree(str_t *s); + static str_t *salloc(int n); + static void sfree(str_t *s); - static str_t *m_zero; + static str_t *m_zero; }; #endif /* _PSTRING_H_ */ - diff --git a/src/emu/sound/discrete.c b/src/emu/sound/discrete.c index ac2a0ace35..f7d5e93a49 100644 --- a/src/emu/sound/discrete.c +++ b/src/emu/sound/discrete.c @@ -698,7 +698,7 @@ void discrete_device::init_nodes(const sound_block_list_t &block_list) { const discrete_block *block = block_list[i]; - //discrete_base_node *node = block->factory->Create(this, block); + //discrete_base_node *node = block->factory->Create(this, block); discrete_base_node *node = block->factory(this, block); /* keep track of special nodes */ if (block->node == NODE_SPECIAL) diff --git a/src/emu/sound/discrete.h b/src/emu/sound/discrete.h index 8db5e8e03a..c796ee79bd 100644 --- a/src/emu/sound/discrete.h +++ b/src/emu/sound/discrete.h @@ -4531,7 +4531,7 @@ discrete_base_node * discrete_node_factory::Create(discrete_device * pdev, co template discrete_base_node *discrete_create_node(discrete_device * pdev, const discrete_block *block) { - return discrete_node_factory< C >().Create(pdev, block); + return discrete_node_factory< C >().Create(pdev, block); } #define DISCRETE_SOUND_EXTERN(name) extern const discrete_block name##_discrete_interface[] diff --git a/src/emu/sound/es5506.c b/src/emu/sound/es5506.c index 14d0773945..43748fab3e 100644 --- a/src/emu/sound/es5506.c +++ b/src/emu/sound/es5506.c @@ -381,7 +381,7 @@ void es5505_device::device_start() /* initialize the regions */ m_region_base[0] = m_es5505_region0 ? (UINT16 *)machine().root_device().memregion(m_es5505_region0)->base() : NULL; m_region_base[1] = m_es5505_region1 ? (UINT16 *)machine().root_device().memregion(m_es5505_region1)->base() : NULL; - + /* initialize the rest of the structure */ m_master_clock = clock(); m_irq_callback_func.resolve(m_es5505_irq_callback, *this); @@ -2208,7 +2208,6 @@ READ16_MEMBER( es5505_device::read ) void es5505_device::voice_bank_w(int voice, int bank) { - #if RAINE_CHECK m_voice[voice].control = CONTROL_STOPMASK; #endif @@ -2226,7 +2225,6 @@ void es550x_device::sound_stream_update(sound_stream &stream, stream_sample_t ** void es5506_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { - #if MAKE_WAVS /* start the logging once we have a sample rate */ if (m_sample_rate) @@ -2273,7 +2271,6 @@ void es5506_device::sound_stream_update(sound_stream &stream, stream_sample_t ** void es5505_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) { - #if MAKE_WAVS /* start the logging once we have a sample rate */ if (m_sample_rate) @@ -2316,4 +2313,4 @@ void es5505_device::sound_stream_update(sound_stream &stream, stream_sample_t ** offset += length; samples -= length; } -} \ No newline at end of file +} diff --git a/src/emu/sound/es5506.h b/src/emu/sound/es5506.h index f4e264e315..a900ac1dd5 100644 --- a/src/emu/sound/es5506.h +++ b/src/emu/sound/es5506.h @@ -64,7 +64,7 @@ struct es550x_voice index(0), filtcount(0), accum_mask(0) {} - + /* external state */ UINT32 control; /* control register */ UINT32 freqcount; /* frequency count register */ @@ -139,9 +139,9 @@ protected: #if MAKE_WAVS void * m_wavraw; /* raw waveform */ #endif - + FILE *m_eslog; - + void update_irq_state(); void update_internal_irq_state(); void compute_tables(); @@ -158,7 +158,7 @@ class es5506_device : public es550x_device, public: es5506_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~es5506_device() {} - + DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); void voice_bank_w(int voice, int bank); @@ -170,8 +170,8 @@ protected: // sound stream update overrides virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); - - + + void generate_samples(INT32 **outputs, int offset, int samples); private: @@ -191,7 +191,7 @@ class es5505_device : public es550x_device, { public: es5505_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + DECLARE_READ16_MEMBER( read ); DECLARE_WRITE16_MEMBER( write ); void voice_bank_w(int voice, int bank); @@ -200,11 +200,11 @@ protected: // device-level overrides virtual void device_config_complete(); virtual void device_start(); - + virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples); - + void generate_samples(INT32 **outputs, int offset, int samples); - + private: // internal state inline void reg_write_low(es550x_voice *voice, offs_t offset, UINT16 data, UINT16 mem_mask); diff --git a/src/emu/sound/k054539.c b/src/emu/sound/k054539.c index 8c3a782afd..9966723354 100644 --- a/src/emu/sound/k054539.c +++ b/src/emu/sound/k054539.c @@ -63,14 +63,14 @@ void k054539_device::static_set_interface(device_t &device, const k054539_interf 22d: Data read/write port 22e: ROM/RAM select (00..7f == ROM banks, 80 = Reverb RAM) 22f: Global control: - .......x - Enable PCM - ......x. - Timer related? - ...x.... - Enable ROM/RAM readback from 0x22d - ..x..... - Timer output enable? - x....... - Disable register RAM updates + .......x - Enable PCM + ......x. - Timer related? + ...x.... - Enable ROM/RAM readback from 0x22d + ..x..... - Timer output enable? + x....... - Disable register RAM updates - The chip has an optional 0x8000 byte reverb buffer. - The reverb delay is actually an offset in this buffer. + The chip has an optional 0x8000 byte reverb buffer. + The reverb delay is actually an offset in this buffer. */ void k054539_device::init_flags(int _flags) @@ -440,7 +440,7 @@ WRITE8_MEMBER(k054539_device::write) cur_limit = data == 0x80 ? 0x4000 : 0x20000; cur_ptr = 0; break; - + case 0x22f: if (!(data & 0x20)) // Disable timer output? { @@ -537,4 +537,4 @@ void k054539_device::device_start() void k054539_device::device_reset() { m_timer->enable(false); -} \ No newline at end of file +} diff --git a/src/emu/sound/k054539.h b/src/emu/sound/k054539.h index c1be626ca0..30369e4a7e 100644 --- a/src/emu/sound/k054539.h +++ b/src/emu/sound/k054539.h @@ -49,9 +49,9 @@ public: k054539_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); // static configuration helpers - static void static_set_interface(device_t &device, const k054539_interface &interface); + static void static_set_interface(device_t &device, const k054539_interface &interface); template static devcb2_base &set_timer_handler(device_t &device, _Object object) { return downcast(device).m_timer_handler.set_callback(object); } - + DECLARE_WRITE8_MEMBER(write); DECLARE_READ8_MEMBER(read); @@ -109,10 +109,10 @@ private: channel channels[8]; sound_stream *stream; - - emu_timer *m_timer; - UINT32 m_timer_state; - devcb2_write_line m_timer_handler; + + emu_timer *m_timer; + UINT32 m_timer_state; + devcb2_write_line m_timer_handler; bool regupdate(); void keyon(int channel); diff --git a/src/emu/sound/k056800.c b/src/emu/sound/k056800.c index 44ae81f6c9..60443468b6 100644 --- a/src/emu/sound/k056800.c +++ b/src/emu/sound/k056800.c @@ -59,7 +59,7 @@ READ8_MEMBER( k056800_device::host_r ) { UINT32 r = offset & 7; UINT8 data = 0; - + switch (r) { case 0: @@ -102,7 +102,7 @@ WRITE8_MEMBER( k056800_device::host_w ) // .... ...x - Mute front // .... ..x. - Mute rear break; - + case 7: // Sound interrupt m_int_pending = true; @@ -119,7 +119,7 @@ READ8_MEMBER( k056800_device::sound_r ) { UINT32 r = offset & 7; UINT8 data = 0; - + switch (r) { case 0: @@ -144,7 +144,7 @@ WRITE8_MEMBER( k056800_device::sound_w ) case 1: m_snd_to_host_regs[r] = data; break; - + case 2: case 3: // TODO: Unknown @@ -167,9 +167,9 @@ WRITE8_MEMBER( k056800_device::sound_w ) m_int_handler(CLEAR_LINE); } break; - + case 5: // TODO: Unknown break; } -} \ No newline at end of file +} diff --git a/src/emu/sound/k056800.h b/src/emu/sound/k056800.h index 2942f3616f..121244e950 100644 --- a/src/emu/sound/k056800.h +++ b/src/emu/sound/k056800.h @@ -13,8 +13,7 @@ ***************************************************************************/ #define MCFG_K056800_ADD(_tag, _clock) \ - MCFG_DEVICE_ADD(_tag, K056800, _clock) \ - + MCFG_DEVICE_ADD(_tag, K056800, _clock) #define MCFG_K056800_INT_HANDLER(_devcb) \ devcb = &k056800_device::set_int_handler(*device, DEVCB2_##_devcb); @@ -45,12 +44,12 @@ protected: private: // internal state - bool m_int_pending; - bool m_int_enabled; - UINT8 m_host_to_snd_regs[4]; - UINT8 m_snd_to_host_regs[2]; + bool m_int_pending; + bool m_int_enabled; + UINT8 m_host_to_snd_regs[4]; + UINT8 m_snd_to_host_regs[2]; - devcb2_write_line m_int_handler; + devcb2_write_line m_int_handler; }; extern const device_type K056800; diff --git a/src/emu/sound/mpeg_audio.c b/src/emu/sound/mpeg_audio.c index d1160026dd..82622e4abf 100644 --- a/src/emu/sound/mpeg_audio.c +++ b/src/emu/sound/mpeg_audio.c @@ -128,7 +128,7 @@ bool mpeg_audio::read_header_amm(bool layer25) int stereo_mode_ext = gb(2); param_index = gb(3); gb(1); // must be zero - + channel_count = stereo_mode != 3 ? 2 : 1; total_bands = total_band_counts[param_index]; @@ -137,7 +137,7 @@ bool mpeg_audio::read_header_amm(bool layer25) joint_bands = joint_band_counts[stereo_mode_ext]; if(joint_bands > total_bands ) joint_bands = total_bands; - + return true; } diff --git a/src/emu/sound/nes_apu.h b/src/emu/sound/nes_apu.h index 996bd1027e..a47c246e03 100644 --- a/src/emu/sound/nes_apu.h +++ b/src/emu/sound/nes_apu.h @@ -34,9 +34,9 @@ * Also make sure to correspond the memory regions to those used in the * processor, as each is shared. */ - + #include "nes_defs.h" - + /* GLOBAL CONSTANTS */ #define SYNCS_MAX1 0x20 #define SYNCS_MAX2 0x80 @@ -56,7 +56,7 @@ public: DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); - + protected: // device-level overrides virtual void device_config_complete(); @@ -77,7 +77,7 @@ private: uint32 m_sync_times1[SYNCS_MAX1]; /* Samples per sync table */ uint32 m_sync_times2[SYNCS_MAX2]; /* Samples per sync table */ sound_stream *m_stream; - + void create_syncs(unsigned long sps); int8 apu_square(square_t *chan); int8 apu_triangle(triangle_t *chan); diff --git a/src/emu/sound/sn76477.c b/src/emu/sound/sn76477.c index 7fc9224f8d..ba4f85b9cf 100644 --- a/src/emu/sound/sn76477.c +++ b/src/emu/sound/sn76477.c @@ -301,7 +301,7 @@ void sn76477_device::device_start() } intialize_noise(); - + /* set up interface values */ _SN76477_enable_w(m_intf_enable); _SN76477_vco_w(m_intf_vco); diff --git a/src/emu/sound/sn76477.h b/src/emu/sound/sn76477.h index 7f446669d1..c472fc19e4 100644 --- a/src/emu/sound/sn76477.h +++ b/src/emu/sound/sn76477.h @@ -82,7 +82,7 @@ class sn76477_device : public device_t, public: sn76477_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); ~sn76477_device() {} - + /* these functions take 0 or 1 as a logic input */ WRITE_LINE_MEMBER( enable_w ); /* active LO, 0 = enabled, 1 = disabled */ WRITE_LINE_MEMBER( mixer_a_w ); @@ -106,8 +106,8 @@ public: /* these functions take a capacitor value in Farads or the voltage on it in Volts */ #define SN76477_EXTERNAL_VOLTAGE_DISCONNECT (-1.0) /* indicates that the voltage is internally computed, - can be used in all the functions that take a - voltage on a capacitor */ + can be used in all the functions that take a + voltage on a capacitor */ void one_shot_cap_w(double data); void one_shot_cap_voltage_w(double data); void slf_cap_w(double data); @@ -131,7 +131,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: /* chip's external interface */ UINT32 m_enable; @@ -167,7 +167,7 @@ private: double m_amplitude_res; double m_feedback_res; double m_pitch_voltage; - + // internal state double m_one_shot_cap_voltage; /* voltage on the one-shot cap */ UINT32 m_one_shot_running_ff; /* 1 = one-shot running, 0 = stopped */ @@ -191,9 +191,9 @@ private: /* others */ sound_stream *m_channel; /* returned by stream_create() */ int m_our_sample_rate; /* from machine.sample_rate() */ - + wav_file *m_file; /* handle of the wave file to produce */ - + double compute_one_shot_cap_charging_rate(); double compute_one_shot_cap_discharging_rate(); double compute_slf_cap_charging_rate(); @@ -206,7 +206,7 @@ private: double compute_attack_decay_cap_charging_rate(); double compute_attack_decay_cap_discharging_rate(); double compute_center_to_peak_voltage_out(); - + void log_enable_line(); void log_mixer_mode(); void log_envelope_mode(); @@ -223,16 +223,16 @@ private: void log_decay_time(); void log_voltage_out(); void log_complete_state(); - + void open_wav_file(); void close_wav_file(); void add_wav_data(INT16 data_l, INT16 data_r); - + void intialize_noise(); inline UINT32 generate_next_real_noise_bit(); - + void state_save_register(); - + void _SN76477_enable_w(UINT32 data); void _SN76477_vco_w(UINT32 data); void _SN76477_mixer_a_w(UINT32 data); diff --git a/src/emu/sound/speaker.h b/src/emu/sound/speaker.h index 88ed216fa8..d439f0897e 100644 --- a/src/emu/sound/speaker.h +++ b/src/emu/sound/speaker.h @@ -83,7 +83,7 @@ private: void speaker_postload(); // DC blocker state - double m_prevx, m_prevy; + double m_prevx, m_prevy; }; extern const device_type SPEAKER_SOUND; diff --git a/src/emu/sound/wave.h b/src/emu/sound/wave.h index c6a22b23e6..1f67e950d9 100644 --- a/src/emu/sound/wave.h +++ b/src/emu/sound/wave.h @@ -13,9 +13,9 @@ class wave_device : public device_t, { public: wave_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + static void static_set_cassette_tag(device_t &device, const char *cassette_tag); - + protected: // device-level overrides virtual void device_config_complete(); diff --git a/src/emu/sound/ymz770.c b/src/emu/sound/ymz770.c index 94a9c8df24..3bc2344528 100644 --- a/src/emu/sound/ymz770.c +++ b/src/emu/sound/ymz770.c @@ -163,7 +163,7 @@ void ymz770_device::sound_stream_update(sound_stream &stream, stream_sample_t ** } } } - + // process channels INT32 mix = 0; @@ -174,11 +174,11 @@ void ymz770_device::sound_stream_update(sound_stream &stream, stream_sample_t ** // force finish current block mix += (m_channels[ch].output_data[m_channels[ch].output_ptr++]*m_channels[ch].volume); m_channels[ch].output_remaining--; - + if (m_channels[ch].output_remaining == 0 && !m_channels[ch].is_playing) m_channels[ch].decoder->clear(); } - + else if (m_channels[ch].is_playing) { retry: @@ -254,11 +254,11 @@ void ymz770_device::internal_reg_write(UINT8 reg, UINT8 data) m_mute = data & 1; m_doen = data >> 1 & 1; break; - + case 0x01: m_vlma = data; break; - + case 0x02: m_bsl = data & 7; m_cpl = data >> 4 & 7; @@ -308,7 +308,7 @@ void ymz770_device::internal_reg_write(UINT8 reg, UINT8 data) break; } } - + // sequencer registers else { diff --git a/src/emu/video/fixfreq.c b/src/emu/video/fixfreq.c index 0ab0c7f7b8..3437c604c3 100644 --- a/src/emu/video/fixfreq.c +++ b/src/emu/video/fixfreq.c @@ -114,27 +114,27 @@ void fixedfreq_device::device_start() //m_vblank_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(vga_device::vblank_timer_cb),this)); recompute_parameters(false); - save_item(NAME(m_vid)); - save_item(NAME(m_last_x)); - save_item(NAME(m_last_y)); - save_item(NAME(m_last_time)); - save_item(NAME(m_line_time)); - save_item(NAME(m_last_hsync_time)); - save_item(NAME(m_last_vsync_time)); - save_item(NAME(m_refresh)); - save_item(NAME(m_clock_period)); - //save_item(NAME(m_bitmap[0])); - //save_item(NAME(m_bitmap[1])); - save_item(NAME(m_cur_bm)); + save_item(NAME(m_vid)); + save_item(NAME(m_last_x)); + save_item(NAME(m_last_y)); + save_item(NAME(m_last_time)); + save_item(NAME(m_line_time)); + save_item(NAME(m_last_hsync_time)); + save_item(NAME(m_last_vsync_time)); + save_item(NAME(m_refresh)); + save_item(NAME(m_clock_period)); + //save_item(NAME(m_bitmap[0])); + //save_item(NAME(m_bitmap[1])); + save_item(NAME(m_cur_bm)); - /* sync separator */ - save_item(NAME(m_vint)); - save_item(NAME(m_int_trig)); - save_item(NAME(m_mult)); + /* sync separator */ + save_item(NAME(m_vint)); + save_item(NAME(m_int_trig)); + save_item(NAME(m_mult)); - save_item(NAME(m_sig_vsync)); - save_item(NAME(m_sig_composite)); - save_item(NAME(m_sig_field)); + save_item(NAME(m_sig_vsync)); + save_item(NAME(m_sig_composite)); + save_item(NAME(m_sig_field)); @@ -210,7 +210,7 @@ int fixedfreq_device::sync_separator(attotime time, double newval) int ret = 0; m_vint += ((double) last_comp - m_vint) * (1.0 - exp(-time.as_double() * m_mult)); - m_sig_composite = (newval < m_sync_threshold) ? 1 : 0 ; + m_sig_composite = (newval < m_sync_threshold) ? 1 : 0 ; m_sig_vsync = (m_vint > m_int_trig) ? 1 : 0; diff --git a/src/emu/video/mb_vcu.c b/src/emu/video/mb_vcu.c index 8df5940425..ac0b989928 100644 --- a/src/emu/video/mb_vcu.c +++ b/src/emu/video/mb_vcu.c @@ -278,7 +278,7 @@ READ8_MEMBER( mb_vcu_device::load_gfx ) UINT8 pen = 0; UINT8 cur_layer; -// cur_layer = (m_mode & 0x3); +// cur_layer = (m_mode & 0x3); cur_layer = 0; switch(m_mode >> 2) diff --git a/src/emu/video/v9938.c b/src/emu/video/v9938.c index 0ae5e77037..8ecdaa22ef 100644 --- a/src/emu/video/v9938.c +++ b/src/emu/video/v9938.c @@ -1425,7 +1425,7 @@ void v99x8_device::mode_graphic7(const pen_t *pens, _PixelType *ln, int line) for (x=0;x<64;x++) { int colour[4]; - int ind; + int ind; colour[0] = m_vram_space->read_byte(((nametbl_addr&1) << 16) | (nametbl_addr>>1)); nametbl_addr++; @@ -1435,8 +1435,8 @@ void v99x8_device::mode_graphic7(const pen_t *pens, _PixelType *ln, int line) nametbl_addr++; colour[3] = m_vram_space->read_byte(((nametbl_addr&1) << 16) | (nametbl_addr>>1)); - ind = (colour[0] & 7) << 11 | (colour[1] & 7) << 14 | - (colour[2] & 7) << 5 | (colour[3] & 7) << 8; + ind = (colour[0] & 7) << 11 | (colour[1] & 7) << 14 | + (colour[2] & 7) << 5 | (colour[3] & 7) << 8; *ln++ = s_pal_indYJK[ind | ((colour[0] >> 3) & 31)]; if (_Width > 512) @@ -1465,7 +1465,7 @@ void v99x8_device::mode_graphic7(const pen_t *pens, _PixelType *ln, int line) for (x=0;x<64;x++) { int colour[4]; - int ind; + int ind; colour[0] = m_vram_space->read_byte(((nametbl_addr&1) << 16) | (nametbl_addr>>1)); nametbl_addr++; @@ -1475,8 +1475,8 @@ void v99x8_device::mode_graphic7(const pen_t *pens, _PixelType *ln, int line) nametbl_addr++; colour[3] = m_vram_space->read_byte(((nametbl_addr&1) << 16) | (nametbl_addr>>1)); - ind = (colour[0] & 7) << 11 | (colour[1] & 7) << 14 | - (colour[2] & 7) << 5 | (colour[3] & 7) << 8; + ind = (colour[0] & 7) << 11 | (colour[1] & 7) << 14 | + (colour[2] & 7) << 5 | (colour[3] & 7) << 8; *ln++ = colour[0] & 8 ? m_pal_ind16[colour[0] >> 4] : s_pal_indYJK[ind | ((colour[0] >> 3) & 30)]; if (_Width > 512) diff --git a/src/lib/formats/abc800_dsk.c b/src/lib/formats/abc800_dsk.c index 8011a48235..b1d0db2c64 100644 --- a/src/lib/formats/abc800_dsk.c +++ b/src/lib/formats/abc800_dsk.c @@ -79,7 +79,7 @@ const abc800_format::format abc800_format::formats[] = { 2000, 16, 40, 1, 256, {}, 1, {}, 55, 22, 54 }, - // track description + // track description // 55x4e 12x00 3xf5 fe 2x00 01 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 // 54x4e 12x00 3xf5 fe 2x00 02 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 // 54x4e 12x00 3xf5 fe 2x00 03 01 f7 22x4e 12x00 3xf5 fb 256xe5 f7 diff --git a/src/lib/formats/adam_dsk.c b/src/lib/formats/adam_dsk.c index 19d285be3f..1b966a3395 100644 --- a/src/lib/formats/adam_dsk.c +++ b/src/lib/formats/adam_dsk.c @@ -45,7 +45,7 @@ const adam_format::format adam_format::formats[] = { floppy_image::FF_525, floppy_image::SSDD, floppy_image::MFM, 2000, 8, 40, 1, 512, {}, 1, {}, 100, 22, 100 }, - + // Unverified gap sizes --> { /* 320K 5 1/4 inch double density */ floppy_image::FF_525, floppy_image::DSDD, floppy_image::MFM, diff --git a/src/lib/formats/itt3030_dsk.c b/src/lib/formats/itt3030_dsk.c index 0e07fe77a1..7e0a570989 100644 --- a/src/lib/formats/itt3030_dsk.c +++ b/src/lib/formats/itt3030_dsk.c @@ -6,7 +6,7 @@ ITT3030 560K disk image format - + *********************************************************************/ @@ -44,4 +44,3 @@ const itt3030_format::format itt3030_format::formats[] = { const floppy_format_type FLOPPY_ITT3030_FORMAT = &floppy_image_format_creator; - diff --git a/src/mame/audio/taito_en.c b/src/mame/audio/taito_en.c index 8d38286941..62b6e8a88e 100644 --- a/src/mame/audio/taito_en.c +++ b/src/mame/audio/taito_en.c @@ -50,7 +50,7 @@ void taito_en_device::device_start() save_item(NAME(m_es5510_dadr_latch)); save_item(NAME(m_es5510_gpr_latch)); save_item(NAME(m_es5510_ram_sel)); - + m_duart68681 = machine().device("duart68681"); } diff --git a/src/mame/audio/taito_en.h b/src/mame/audio/taito_en.h index c30930bd51..07c8b70557 100644 --- a/src/mame/audio/taito_en.h +++ b/src/mame/audio/taito_en.h @@ -17,7 +17,7 @@ public: //todo: hook up cpu/es5510 DECLARE_READ16_MEMBER( es5510_dsp_r ); DECLARE_WRITE16_MEMBER( es5510_dsp_w ); - + DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); protected: @@ -40,7 +40,7 @@ private: UINT8 m_es5510_ram_sel; UINT32 *m_snd_shared_ram; - + duartn68681_device *m_duart68681; }; diff --git a/src/mame/drivers/1942.c b/src/mame/drivers/1942.c index 445d56efc4..b8459cea6f 100644 --- a/src/mame/drivers/1942.c +++ b/src/mame/drivers/1942.c @@ -107,7 +107,7 @@ ADDRESS_MAP_END WRITE8_MEMBER(_1942_state::c1942p_f600_w) { -// printf("c1942p_f600_w %02x\n", data); +// printf("c1942p_f600_w %02x\n", data); } WRITE8_MEMBER(_1942_state::c1942p_palette_w) @@ -124,7 +124,7 @@ WRITE8_MEMBER(_1942_state::c1942p_palette_w) static ADDRESS_MAP_START( c1942p_map, AS_PROGRAM, 8, _1942_state ) AM_RANGE(0x0000, 0x7fff) AM_ROM AM_RANGE(0x8000, 0xbfff) AM_ROMBANK("bank1") - + AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(c1942_fgvideoram_w) AM_SHARE("fg_videoram") AM_RANGE(0xd800, 0xdbff) AM_RAM_WRITE(c1942_bgvideoram_w) AM_SHARE("bg_videoram") @@ -146,7 +146,7 @@ static ADDRESS_MAP_START( c1942p_map, AS_PROGRAM, 8, _1942_state ) AM_RANGE(0xf701, 0xf701) AM_READ_PORT("SYSTEM") AM_RANGE(0xf702, 0xf702) AM_READ_PORT("DSWB") AM_RANGE(0xf703, 0xf703) AM_READ_PORT("P1") - AM_RANGE(0xf704, 0xf704) AM_READ_PORT("P2") + AM_RANGE(0xf704, 0xf704) AM_READ_PORT("P2") ADDRESS_MAP_END static ADDRESS_MAP_START( sound_map, AS_PROGRAM, 8, _1942_state ) diff --git a/src/mame/drivers/2mindril.c b/src/mame/drivers/2mindril.c index 4191404ca8..72aa4ce837 100644 --- a/src/mame/drivers/2mindril.c +++ b/src/mame/drivers/2mindril.c @@ -50,7 +50,7 @@ public: /* memory pointers */ required_shared_ptr m_iodata; - + /* input-related */ UINT16 m_defender_sensor; UINT16 m_shutter_sensor; @@ -76,7 +76,7 @@ public: TIMER_SHUTTER_REQ, TIMER_DEFENDER_REQ }; - + protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); #endif @@ -152,7 +152,7 @@ void _2mindril_state::device_timer(emu_timer &timer, device_timer_id id, int par m_shutter_sensor = param; break; case TIMER_DEFENDER_REQ: - m_defender_sensor = param; + m_defender_sensor = param; break; default: assert_always(FALSE, "Unknown id in _2mindril_state::device_timer"); diff --git a/src/mame/drivers/acefruit.c b/src/mame/drivers/acefruit.c index 787b25bc94..f06ebfc389 100644 --- a/src/mame/drivers/acefruit.c +++ b/src/mame/drivers/acefruit.c @@ -44,14 +44,14 @@ public: UINT32 screen_update_acefruit(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(acefruit_vblank); void acefruit_update_irq(int vpos); - + enum { TIMER_ACEFRUIT_REFRESH }; protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); }; @@ -83,7 +83,7 @@ void acefruit_state::device_timer(emu_timer &timer, device_timer_id id, int para switch(id) { case TIMER_ACEFRUIT_REFRESH: - + m_screen->update_partial(vpos ); acefruit_update_irq(vpos); diff --git a/src/mame/drivers/arachnid.c b/src/mame/drivers/arachnid.c index 214b111a01..0f7f9511d2 100644 --- a/src/mame/drivers/arachnid.c +++ b/src/mame/drivers/arachnid.c @@ -1,7 +1,7 @@ /* - Arachnid - English Mark Darts + Arachnid - English Mark Darts - Driver by Jim Stolis. + Driver by Jim Stolis. --- Technical Notes --- Name: English Mark Darts @@ -9,49 +9,49 @@ Year: 1987/88/89/90 --- Hardware --- - A 6809 CPU (U3) is clocked by a 556 (U2) circuit with 3 Pin addressing decoding via a 74LS138 (U14) - Program ROM is a 27256 (U15) - Two 6821 PIAs (U4/U17) are used for I/O - Video is processed via a TMS9118 (U11) with two TMS4416 (U12/U13) as RAM - Main RAM is a 2K 6116 (U23) chip - Sound is generated via a PTM 6840 (U16) directly to an amplified speaker + A 6809 CPU (U3) is clocked by a 556 (U2) circuit with 3 Pin addressing decoding via a 74LS138 (U14) + Program ROM is a 27256 (U15) + Two 6821 PIAs (U4/U17) are used for I/O + Video is processed via a TMS9118 (U11) with two TMS4416 (U12/U13) as RAM + Main RAM is a 2K 6116 (U23) chip + Sound is generated via a PTM 6840 (U16) directly to an amplified speaker - --- Target Interface Board --- - The target interface board is used to combine 33 conductors from the switch matrix - into 16 conductors. The middle 13 pin connector is common to all switches. + --- Target Interface Board --- + The target interface board is used to combine 33 conductors from the switch matrix + into 16 conductors. The middle 13 pin connector is common to all switches. - 3 connectors and their labels - EFBHDACGH NMPLMNJOMIKOP EBACFDCEAHB + 3 connectors and their labels + EFBHDACGH NMPLMNJOMIKOP EBACFDCEAHB - Switch Matrix Table - Score Single Double Triple - 1 DN EN FN - 2 AL BL CL - 3 AN BN CN - 4 DL EL FL - 5 AP BP CP - 6 GL HL GP - 7 DO EO FO - 8 GI HI GM - 9 AO BO CO - 10 AI BI CI - 11 AK BK CK - 12 DP EP FP - 13 AM BM CM - 14 GK HK GO - 15 GJ HJ GN - 16 AJ BJ CJ - 17 DM EM FM - 18 DI EI FI - 19 DJ EJ FJ - 20 DK EK FK - Bull -- HM -- + Switch Matrix Table + Score Single Double Triple + 1 DN EN FN + 2 AL BL CL + 3 AN BN CN + 4 DL EL FL + 5 AP BP CP + 6 GL HL GP + 7 DO EO FO + 8 GI HI GM + 9 AO BO CO + 10 AI BI CI + 11 AK BK CK + 12 DP EP FP + 13 AM BM CM + 14 GK HK GO + 15 GJ HJ GN + 16 AJ BJ CJ + 17 DM EM FM + 18 DI EI FI + 19 DJ EJ FJ + 20 DK EK FK + Bull -- HM -- - TODO: - - Dip Switches (Controls credits per coin), Currently 2 coins per credit - - Test Mode Won't Activate - - Layout with Lamps + TODO: + - Dip Switches (Controls credits per coin), Currently 2 coins per credit + - Test Mode Won't Activate + - Layout with Lamps */ #include "emu.h" @@ -65,10 +65,10 @@ #define SCREEN_TAG "screen" #define M6809_TAG "u3" #define TMS9118_TAG "u11" -#define PIA6821_U4_TAG "u4" -#define PIA6821_U17_TAG "u17" -#define PTM6840_TAG "u16" -#define SPEAKER_TAG "speaker" +#define PIA6821_U4_TAG "u4" +#define PIA6821_U17_TAG "u17" +#define PTM6840_TAG "u16" +#define SPEAKER_TAG "speaker" class arachnid_state : public driver_device { @@ -95,11 +95,11 @@ public: DECLARE_WRITE8_MEMBER( pia_u4_pb_w ); DECLARE_WRITE8_MEMBER( pia_u4_pca_w ); DECLARE_WRITE8_MEMBER( pia_u4_pcb_w ); - + DECLARE_READ8_MEMBER( pia_u17_pa_r ); DECLARE_READ8_MEMBER( pia_u17_pca_r ); - DECLARE_WRITE8_MEMBER( pia_u17_pb_w ); - DECLARE_WRITE8_MEMBER( pia_u17_pcb_w ); + DECLARE_WRITE8_MEMBER( pia_u17_pb_w ); + DECLARE_WRITE8_MEMBER( pia_u17_pcb_w ); DECLARE_WRITE8_MEMBER(ptm_o1_callback); @@ -421,14 +421,14 @@ WRITE8_MEMBER( arachnid_state::pia_u17_pcb_w ) static const pia6821_interface pia_u4_intf = { - DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pa_r), // input A - From Switch Matrix + DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pa_r), // input A - From Switch Matrix DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pb_r), // input B - From Switch Matrix DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pca_r), // input CA1 - SW1 Coin In (Coin Door) - DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pcb_r), // input CB1 - SW2 Test Mode (Coin Door) + DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pcb_r), // input CB1 - SW2 Test Mode (Coin Door) DEVCB_NULL, // input CA2 - DEVCB_NULL, // input CB2 - DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pa_w), // output A - To Switch Matrix - DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pb_w), // output B - To Switch Matrix + DEVCB_NULL, // input CB2 + DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pa_w), // output A - To Switch Matrix + DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pb_w), // output B - To Switch Matrix DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pca_w), // output CA2 - Remove Darts Lamp DEVCB_DRIVER_MEMBER(arachnid_state, pia_u4_pcb_w), // output CB2 - Throw Darts Lamp DEVCB_NULL, // irq A @@ -437,15 +437,15 @@ static const pia6821_interface pia_u4_intf = static const pia6821_interface pia_u17_intf = { - DEVCB_DRIVER_MEMBER(arachnid_state, pia_u17_pa_r), // input A - Select, Player Change, Coin, Test, DIPSW1 - DEVCB_NULL, // input B + DEVCB_DRIVER_MEMBER(arachnid_state, pia_u17_pa_r), // input A - Select, Player Change, Coin, Test, DIPSW1 + DEVCB_NULL, // input B DEVCB_DRIVER_MEMBER(arachnid_state, pia_u17_pca_r), // input CA1 - 1000 Hz Input - DEVCB_NULL, // input CB1 + DEVCB_NULL, // input CB1 DEVCB_NULL, // input CA2 - DEVCB_NULL, // input CB2 - DEVCB_NULL, // output A - DEVCB_DRIVER_MEMBER(arachnid_state, pia_u17_pb_w), // output B - Select Lamp, Player Change Lamp - DEVCB_NULL, // output CA2 + DEVCB_NULL, // input CB2 + DEVCB_NULL, // output A + DEVCB_DRIVER_MEMBER(arachnid_state, pia_u17_pb_w), // output B - Select Lamp, Player Change Lamp + DEVCB_NULL, // output CA2 DEVCB_DRIVER_MEMBER(arachnid_state, pia_u17_pcb_w), // output CB2 - Target Lamp DEVCB_NULL, // irq A DEVCB_NULL // irq B @@ -461,7 +461,6 @@ static const pia6821_interface pia_u17_intf = void arachnid_state::machine_start() { - } /*************************************************************************** diff --git a/src/mame/drivers/arcadia.c b/src/mame/drivers/arcadia.c index c24898fb71..bc9cf10c74 100644 --- a/src/mame/drivers/arcadia.c +++ b/src/mame/drivers/arcadia.c @@ -395,8 +395,7 @@ MACHINE_CONFIG_END ROM_LOAD16_BYTE_BIOS( 5, "gcp_v400_1-hi.u16", 0x000000, 0x10000, CRC(69295167) SHA1(855f53abbb9dc15e5518e16c5c2dfe4134d07306) ) \ ROM_LOAD16_BYTE_BIOS( 5, "gcp_v400_1-lo.u11", 0x000001, 0x10000, CRC(504c2171) SHA1(a93367f520afb86c97c0a191714b72823c95cdd2) ) \ ROM_LOAD16_BYTE_BIOS( 5, "gcp_v400_2-hi.u17", 0x020000, 0x10000, CRC(13fb4e2d) SHA1(3eef07aecc3a201ae0b20634c7fd0c87c89fd7f1) ) \ - ROM_LOAD16_BYTE_BIOS( 5, "gcp_v400_2-lo.u12", 0x020001, 0x10000, CRC(a5cc4515) SHA1(80070521476e92323a6baa6e55928ca5b751a332) ) \ - + ROM_LOAD16_BYTE_BIOS( 5, "gcp_v400_2-lo.u12", 0x020001, 0x10000, CRC(a5cc4515) SHA1(80070521476e92323a6baa6e55928ca5b751a332) ) ROM_START( ar_bios ) ARCADIA_BIOS @@ -952,7 +951,7 @@ DRIVER_INIT_MEMBER(arcadia_amiga_state,socc) { arcadia_init(); generic_decode("u DRIVER_INIT_MEMBER(arcadia_amiga_state,sprg) { arcadia_init(); generic_decode("user3", 4, 7, 3, 0, 6, 5, 2, 1); } DRIVER_INIT_MEMBER(arcadia_amiga_state,xeon) { arcadia_init(); generic_decode("user3", 3, 1, 2, 4, 0, 5, 6, 7); } DRIVER_INIT_MEMBER(arcadia_amiga_state,pm) { arcadia_init(); generic_decode("user3", 7, 6, 5, 4, 3, 2, 1, 0); } // no scramble -DRIVER_INIT_MEMBER(arcadia_amiga_state,dlta) { arcadia_init(); generic_decode("user3", 4, 6, 5, 7, 3, 2, 1, 0); generic_decode("user3", 7, 6, 0, 4, 3, 2, 1, 5); generic_decode("user3", 7, 6, 5, 4, 1, 2, 3, 0); generic_decode("user3", 7, 6, 2, 4, 3, 5, 1, 0); generic_decode("user3", 7, 6, 3, 4, 5, 2, 1, 0); generic_decode("user3", 7, 4, 5, 6, 3, 2, 1, 0); generic_decode("user3", 7, 5, 6, 4, 3, 2, 1, 0); } +DRIVER_INIT_MEMBER(arcadia_amiga_state,dlta) { arcadia_init(); generic_decode("user3", 4, 6, 5, 7, 3, 2, 1, 0); generic_decode("user3", 7, 6, 0, 4, 3, 2, 1, 5); generic_decode("user3", 7, 6, 5, 4, 1, 2, 3, 0); generic_decode("user3", 7, 6, 2, 4, 3, 5, 1, 0); generic_decode("user3", 7, 6, 3, 4, 5, 2, 1, 0); generic_decode("user3", 7, 4, 5, 6, 3, 2, 1, 0); generic_decode("user3", 7, 5, 6, 4, 3, 2, 1, 0); } diff --git a/src/mame/drivers/aristmk4.c b/src/mame/drivers/aristmk4.c index be26955861..9ef105ebf9 100644 --- a/src/mame/drivers/aristmk4.c +++ b/src/mame/drivers/aristmk4.c @@ -170,8 +170,8 @@ Promoted Fortune Hunter and clone to working status, as they were in fact working for quite a while. Fixed ROM names for kgbird/kgbirda; 5c and 10c variants were mixed up. - 11/12/13 - Lord-Data - Added hopper and meter outputs. + 11/12/13 - Lord-Data + Added hopper and meter outputs. **************************************************************************** @@ -631,12 +631,12 @@ WRITE8_MEMBER(aristmk4_state::mkiv_pia_outb) printf("Unhandled Mechanical meter %d pulse: %02d\n",i+1, emet[i]); break; } - + m_samples->start(i,0); // pulse sound for mechanical meters } else { - // if there is not a value set, this meter is not active, reset output to 0 + // if there is not a value set, this meter is not active, reset output to 0 switch(i+1) { case 4: @@ -649,7 +649,7 @@ WRITE8_MEMBER(aristmk4_state::mkiv_pia_outb) break; } } - } + } } /* sound interface for playing mechanical meter sound */ @@ -715,7 +715,7 @@ READ8_MEMBER(aristmk4_state::via_b_r) // CBOPT1 - Bit7 - Cash box optics /* Coin input... CBOPT2 goes LOW, then the optic detectors OPTA1 / OPTB1 detect the coin passing */ /* The timer causes one credit, per 150ms or so... */ - + switch(m_inscrd) { case 0x00: @@ -864,7 +864,7 @@ WRITE8_MEMBER(aristmk4_state::via_cb2_w) if (data==0x01) m_hopper_motor=data; else if (m_hopper_motor<0x02) - m_hopper_motor=data; + m_hopper_motor=data; output_set_value("hopper_motor", m_hopper_motor); // stop motor } @@ -1016,14 +1016,14 @@ INPUT PORTS static INPUT_PORTS_START(aristmk4) PORT_START("via_port_b") - PORT_DIPNAME( 0x10, 0x00, "1" ) // "COIN FAULT" + PORT_DIPNAME( 0x10, 0x00, "1" ) // "COIN FAULT" PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x10, DEF_STR( On ) ) PORT_DIPLOCATION("AY:1") - PORT_DIPNAME( 0x20, 0x00, "2" ) // "COIN FAULT" + PORT_DIPNAME( 0x20, 0x00, "2" ) // "COIN FAULT" PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x20, DEF_STR( On ) ) PORT_DIPLOCATION("AY:2") - PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Hopper Coin Release") PORT_CODE(KEYCODE_BACKSLASH) // "ILLEGAL COIN PAID" - + PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Hopper Coin Release") PORT_CODE(KEYCODE_BACKSLASH) // "ILLEGAL COIN PAID" + PORT_DIPNAME( 0x80, 0x00, "CBOPT1" ) PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x80, DEF_STR( On ) ) PORT_DIPLOCATION("AY:4") @@ -1037,7 +1037,7 @@ static INPUT_PORTS_START(aristmk4) PORT_DIPNAME( 0x04, 0x00, "HOPHI2") // hopper 2 full PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPLOCATION("5002:3") PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, "DOPTI") // photo optic door DOOR OPEN SENSE SWITCH + PORT_DIPNAME( 0x08, 0x00, "DOPTI") // photo optic door DOOR OPEN SENSE SWITCH PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_KEYIN ) PORT_NAME("Audit Key") PORT_TOGGLE PORT_CODE(KEYCODE_K) // AUDTSW diff --git a/src/mame/drivers/atari_s1.c b/src/mame/drivers/atari_s1.c index 5bcae11222..6ee879cdc1 100644 --- a/src/mame/drivers/atari_s1.c +++ b/src/mame/drivers/atari_s1.c @@ -328,8 +328,8 @@ ROM_END // ROM_LOAD("atarianb.e00", 0x7000, 0x0800, CRC(74fc86e4) SHA1(135d75e5c03feae0929fa84caa3c802353cdd94e)) // ROM_LOAD("atarian.e0", 0x7800, 0x0800, CRC(45cb0427) SHA1(e286930ca36bdd0f79acefd142d2a5431fa8005b)) // -// ROM_REGION(0x1000, "sound1", 0) -// ROM_LOAD("82s130.bin", 0x0000, 0x0200, CRC(da1f77b4) SHA1(b21fdc1c6f196c320ec5404013d672c35f95890b)) +// ROM_REGION(0x1000, "sound1", 0) +// ROM_LOAD("82s130.bin", 0x0000, 0x0200, CRC(da1f77b4) SHA1(b21fdc1c6f196c320ec5404013d672c35f95890b)) //ROM_END /*------------------------------------------------------------------- diff --git a/src/mame/drivers/atarig42.c b/src/mame/drivers/atarig42.c index 9b41dc8cdf..f722594402 100644 --- a/src/mame/drivers/atarig42.c +++ b/src/mame/drivers/atarig42.c @@ -569,14 +569,14 @@ MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( atarig42_0x200, atarig42 ) MCFG_ATARIRLE_ADD("rle", modesc_0x200) - + /* ASIC65 */ MCFG_ASIC65_ADD("asic65", ASIC65_ROMBASED) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( atarig42_0x400, atarig42 ) MCFG_ATARIRLE_ADD("rle", modesc_0x400) - + /* ASIC65 */ MCFG_ASIC65_ADD("asic65", ASIC65_GUARDIANS) MACHINE_CONFIG_END @@ -783,24 +783,24 @@ DRIVER_INIT_MEMBER(atarig42_state,roadriot) main.set_direct_update_handler(direct_update_delegate(FUNC(atarig42_state::atarig42_sloop_direct_handler), this)); /* - Road Riot color MUX + Road Riot color MUX - CRA10=!MGEP*!AN.VID7*AN.0 -- if (mopri < pfpri) && (!alpha) - +!AN.VID7*AN.0*MO.0 or if (mopix == 0) && (!alpha) + CRA10=!MGEP*!AN.VID7*AN.0 -- if (mopri < pfpri) && (!alpha) + +!AN.VID7*AN.0*MO.0 or if (mopix == 0) && (!alpha) - CRA9=MGEP*!AN.VID7*AN.0*!MO.0 -- if (mopri >= pfpri) && (mopix != 0) && (!alpha) - +!AN.VID7*AN.0*PF.VID9 or if (pfpix & 0x200) && (!alpha) + CRA9=MGEP*!AN.VID7*AN.0*!MO.0 -- if (mopri >= pfpri) && (mopix != 0) && (!alpha) + +!AN.VID7*AN.0*PF.VID9 or if (pfpix & 0x200) && (!alpha) - CRA8=MGEP*!AN.VID7*AN.0*!MO.0*MVID8 -- if (mopri >= pfpri) && (mopix != 0) && (mopix & 0x100) && (!alpha) - +!MGEP*!AN.VID7*AN.0*PF.VID8 or if (mopri < pfpri) && (pfpix & 0x100) && (!alpha) - +!AN.VID7*AN.0*MO.0*PF.VID8 or if (pfpix & 0x100) && (!alpha) + CRA8=MGEP*!AN.VID7*AN.0*!MO.0*MVID8 -- if (mopri >= pfpri) && (mopix != 0) && (mopix & 0x100) && (!alpha) + +!MGEP*!AN.VID7*AN.0*PF.VID8 or if (mopri < pfpri) && (pfpix & 0x100) && (!alpha) + +!AN.VID7*AN.0*MO.0*PF.VID8 or if (pfpix & 0x100) && (!alpha) - CRMUXB=!AN.VID7*AN.0 -- if (!alpha) + CRMUXB=!AN.VID7*AN.0 -- if (!alpha) - CRMUXA=!MGEP -- if (mopri < pfpri) - +MO.0 or (mopix == 0) - +AN.VID7 or (alpha) - +!AN.0 + CRMUXA=!MGEP -- if (mopri < pfpri) + +MO.0 or (mopix == 0) + +AN.VID7 or (alpha) + +!AN.0 */ } @@ -818,24 +818,24 @@ DRIVER_INIT_MEMBER(atarig42_state,guardian) main.set_direct_update_handler(direct_update_delegate(FUNC(atarig42_state::atarig42_sloop_direct_handler), this)); /* - Guardians color MUX + Guardians color MUX - CRA10=MGEP*!AN.VID7*AN.0*!MO.0 -- if (mopri >= pfpri) && (!alpha) && (mopix != 0) + CRA10=MGEP*!AN.VID7*AN.0*!MO.0 -- if (mopri >= pfpri) && (!alpha) && (mopix != 0) - CRA9=MGEP*!AN.VID7*AN.0*!MO.0*MVID9 -- if (mopri >= pfpri) && (!alpha) && (mopix != 0) && (mopix & 0x200) - +!MGEP*!AN.VID7*AN.0*PF.VID9 or if (mopri < pfpri) && (!alpha) && (pfpix & 0x200) - +!AN.VID7*AN.0*MO.0*PF.VID9 or if (mopix == 0) && (!alpha) && (pfpix & 0x200) + CRA9=MGEP*!AN.VID7*AN.0*!MO.0*MVID9 -- if (mopri >= pfpri) && (!alpha) && (mopix != 0) && (mopix & 0x200) + +!MGEP*!AN.VID7*AN.0*PF.VID9 or if (mopri < pfpri) && (!alpha) && (pfpix & 0x200) + +!AN.VID7*AN.0*MO.0*PF.VID9 or if (mopix == 0) && (!alpha) && (pfpix & 0x200) - CRA8=MGEP*!AN.VID7*AN.0*!MO.0*MVID8 -- if (mopri >= pfpri) && (!alpha) && (mopix != 0) && (mopix & 0x100) - +!MGEP*!AN.VID7*AN.0*PF.VID8 or if (mopri < pfpri) && (!alpha) && (pfpix & 0x100) - +!AN.VID7*AN.0*MO.0*PF.VID8 or if (mopix == 0) && (!alpha) && (pfpix & 0x100) + CRA8=MGEP*!AN.VID7*AN.0*!MO.0*MVID8 -- if (mopri >= pfpri) && (!alpha) && (mopix != 0) && (mopix & 0x100) + +!MGEP*!AN.VID7*AN.0*PF.VID8 or if (mopri < pfpri) && (!alpha) && (pfpix & 0x100) + +!AN.VID7*AN.0*MO.0*PF.VID8 or if (mopix == 0) && (!alpha) && (pfpix & 0x100) - CRMUXB=!AN.VID7*AN.0 -- if (!alpha) + CRMUXB=!AN.VID7*AN.0 -- if (!alpha) - CRMUXA=!MGEP -- if (mopri < pfpri) - +MO.0 or (mopix == 0) - +AN.VID7 or (alpha) - +!AN.0 + CRMUXA=!MGEP -- if (mopri < pfpri) + +MO.0 or (mopix == 0) + +AN.VID7 or (alpha) + +!AN.0 */ } diff --git a/src/mame/drivers/bfm_sc4h.c b/src/mame/drivers/bfm_sc4h.c index 1e095d058d..3152c2900a 100644 --- a/src/mame/drivers/bfm_sc4h.c +++ b/src/mame/drivers/bfm_sc4h.c @@ -702,7 +702,7 @@ void m68307_duart_irq_handler(device_t *device, int state, UINT8 vector) void m68307_duart_tx(device_t *device, int channel, UINT8 data) { if (channel==0) - { + { logerror("m68307_duart_tx %02x\n",data); } else diff --git a/src/mame/drivers/capbowl.c b/src/mame/drivers/capbowl.c index ad5d031649..0bbec1b749 100644 --- a/src/mame/drivers/capbowl.c +++ b/src/mame/drivers/capbowl.c @@ -92,7 +92,7 @@ #include "sound/2203intf.h" #include "sound/dac.h" -#define MASTER_CLOCK XTAL_8MHz +#define MASTER_CLOCK XTAL_8MHz /************************************* @@ -370,7 +370,7 @@ static MACHINE_CONFIG_START( capbowl, capbowl_state ) MCFG_CPU_ADD("audiocpu", M6809E, MASTER_CLOCK) MCFG_CPU_PROGRAM_MAP(sound_map) -// MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_ASTABLE(100000.0, 100000.0, 0.1e-6) * 15.5) // TODO +// MCFG_WATCHDOG_TIME_INIT(PERIOD_OF_555_ASTABLE(100000.0, 100000.0, 0.1e-6) * 15.5) // TODO MCFG_NVRAM_ADD_RANDOM_FILL("nvram") diff --git a/src/mame/drivers/cham24.c b/src/mame/drivers/cham24.c index 68430e7c77..0500e232fe 100644 --- a/src/mame/drivers/cham24.c +++ b/src/mame/drivers/cham24.c @@ -73,7 +73,7 @@ public: required_device m_maincpu; required_device m_nesapu; required_device m_ppu; - + UINT8* m_nt_ram; UINT8* m_nt_page[4]; UINT32 m_in_0; diff --git a/src/mame/drivers/cinemat.c b/src/mame/drivers/cinemat.c index bcde46f811..80a62d2ca1 100644 --- a/src/mame/drivers/cinemat.c +++ b/src/mame/drivers/cinemat.c @@ -631,13 +631,13 @@ static INPUT_PORTS_START( warrior ) PORT_BIT( 0xe000, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_START("SWITCHES") - PORT_DIPNAME( 0x03, 0x02, "Time" ) PORT_DIPLOCATION("SW1:!1,!2") + PORT_DIPNAME( 0x03, 0x02, "Time" ) PORT_DIPLOCATION("SW1:!1,!2") PORT_DIPSETTING( 0x00, "0:30/coin" ) PORT_DIPSETTING( 0x02, "1:00/coin" ) PORT_DIPSETTING( 0x01, "1:30/coin" ) PORT_DIPSETTING( 0x03, "2:00/coin" ) PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_HIGH, "SW1:!3" ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:!4") + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:!4") PORT_DIPSETTING( 0x00, DEF_STR( 2C_1C ) ) PORT_DIPSETTING( 0x08, DEF_STR( 1C_1C ) ) PORT_DIPUNUSED_DIPLOC( 0x10, IP_ACTIVE_HIGH, "SW1:!5" ) diff --git a/src/mame/drivers/csplayh5.c b/src/mame/drivers/csplayh5.c index 103b69f767..478c4903c7 100644 --- a/src/mame/drivers/csplayh5.c +++ b/src/mame/drivers/csplayh5.c @@ -11,13 +11,13 @@ - Implement DVD routing and YUV decoding; - game timings seem busted, could be due of missing DVD hook-up - csplayh1: inputs doesn't work at all, slower than the others too - - h8 type is almost likely to be wrong; + - h8 type is almost likely to be wrong; - DVD Notes: - - TMP68301 communicates with h8 via their respective internal serial comms - - First command is a "?P", which, according to the Pioneer V5000 protocol manual - is an Active Mode request. Manual is at: - http://www.pioneerelectronics.com/ephox/StaticFiles/Manuals/Business/Pio%20V5000-RS232%20-%20CPM.pdf + DVD Notes: + - TMP68301 communicates with h8 via their respective internal serial comms + - First command is a "?P", which, according to the Pioneer V5000 protocol manual + is an Active Mode request. Manual is at: + http://www.pioneerelectronics.com/ephox/StaticFiles/Manuals/Business/Pio%20V5000-RS232%20-%20CPM.pdf After returning a correct status code, tmp68301 sends "FSDVD04.MPG00001" to serial, probably tries to playback the file ... diff --git a/src/mame/drivers/deco_ld.c b/src/mame/drivers/deco_ld.c index 8ad1c82843..8754d7cbfb 100644 --- a/src/mame/drivers/deco_ld.c +++ b/src/mame/drivers/deco_ld.c @@ -640,7 +640,7 @@ ROM_START( cobraa ) ROM_REGION( 0x40000, "misc", 0 ) ROM_LOAD( "lp4-1.pal16l8cn.bin", 0x0000, 0x40000, CRC(4aeb2c7e) SHA1(3c962656cffc8d927047c64a15afccab767d776f) ) // dumped with cgfm's tool ROM_LOAD( "lp4-1.pal16l8cn.pld", 0x0000, 0x00f71, CRC(ac1f1177) SHA1(ab721a840207354916c96e0ae83220fed12c6352) ) -// ROM_LOAD( "lp4-2-pal10l8.d6.jed", 0x0000, 0x00249, CRC(309b3ce5) SHA1(04f185911d33730004c7cd44a693dd1b69b82032) ) +// ROM_LOAD( "lp4-2-pal10l8.d6.jed", 0x0000, 0x00249, CRC(309b3ce5) SHA1(04f185911d33730004c7cd44a693dd1b69b82032) ) ROM_LOAD( "lp4-2-pal10l8.d6.bin", 0x0000, 0x0002c, CRC(e594fd13) SHA1(4bb8a9b7cf8f8eaa3c9f290b6e5085a10c927e20) ) ROM_REGION( 0x20, "proms", 0 ) diff --git a/src/mame/drivers/exidy440.c b/src/mame/drivers/exidy440.c index 4344cc9e1e..39aad94c4f 100644 --- a/src/mame/drivers/exidy440.c +++ b/src/mame/drivers/exidy440.c @@ -1698,7 +1698,7 @@ ROM_START( whodunit ) /* Version 9 */ 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( "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 diff --git a/src/mame/drivers/famibox.c b/src/mame/drivers/famibox.c index cd77816891..cd3a3fb86b 100644 --- a/src/mame/drivers/famibox.c +++ b/src/mame/drivers/famibox.c @@ -79,7 +79,7 @@ public: required_device m_maincpu; required_device m_nesapu; required_device m_ppu; - + UINT8* m_nt_ram; UINT8* m_nt_page[4]; diff --git a/src/mame/drivers/galaxold.c b/src/mame/drivers/galaxold.c index 35cdb58115..7c54ee5a2e 100644 --- a/src/mame/drivers/galaxold.c +++ b/src/mame/drivers/galaxold.c @@ -934,8 +934,8 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( racknrol_io, AS_IO, 8, galaxold_state ) AM_RANGE(0x1d, 0x1d) AM_DEVWRITE("snsnd", sn76489a_device, write) -// AM_RANGE(0x1e, 0x1e) AM_WRITENOP -// AM_RANGE(0x1f, 0x1f) AM_WRITENOP +// AM_RANGE(0x1e, 0x1e) AM_WRITENOP +// AM_RANGE(0x1f, 0x1f) AM_WRITENOP AM_RANGE(0x20, 0x3f) AM_WRITE(racknrol_tiles_bank_w) AM_SHARE("racknrol_tbank") AM_RANGE(S2650_SENSE_PORT, S2650_SENSE_PORT) AM_READ_PORT("SENSE") ADDRESS_MAP_END diff --git a/src/mame/drivers/ghosteo.c b/src/mame/drivers/ghosteo.c index 649dbf1e4a..52b5ee8638 100644 --- a/src/mame/drivers/ghosteo.c +++ b/src/mame/drivers/ghosteo.c @@ -93,7 +93,7 @@ public: required_device m_i2cmem; required_device m_s3c2410; required_shared_ptr m_system_memory; - + int m_security_count; UINT32 m_bballoon_port[20]; struct nand_t m_nand; @@ -614,7 +614,7 @@ WRITE32_MEMBER(ghosteo_state::soundlatch_w) void ghosteo_state::machine_start() { m_flash = (UINT8 *)memregion( "user1")->base(); - + // Set up the QS1000 program ROM banking, taking care not to overlap the internal RAM machine().device("qs1000:cpu")->memory().space(AS_IO).install_read_bank(0x0100, 0xffff, "bank"); membank("qs1000:bank")->configure_entries(0, 8, memregion("qs1000:cpu")->base()+0x100, 0x10000); @@ -665,7 +665,7 @@ static MACHINE_CONFIG_START( ghosteo, ghosteo_state ) /* sound hardware */ MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") - + MCFG_QS1000_ADD("qs1000", XTAL_24MHz, qs1000_intf) MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) @@ -736,10 +736,10 @@ ROM_START( bballoon ) ROM_LOAD( "flash.u1", 0x000000, 0x2000000, BAD_DUMP CRC(73285634) SHA1(4d0210c1bebdf3113a99978ffbcd77d6ee854168) ) // missing ECC data // banked every 0x10000 bytes ? - ROM_REGION( 0x080000, "qs1000:cpu", 0 ) + ROM_REGION( 0x080000, "qs1000:cpu", 0 ) ROM_LOAD( "b2.u20", 0x000000, 0x080000, CRC(0a12334c) SHA1(535b5b34f28435517218100d70147d87809f485a) ) - ROM_REGION( 0x1000000, "qs1000", 0 ) + ROM_REGION( 0x1000000, "qs1000", 0 ) ROM_LOAD( "b1.u16", 0x000000, 0x100000, CRC(c42c1c85) SHA1(e1f49d556ffd6bc27142a7784c3bb8e37999857d) ) /* QDSP samples (SFX) */ ROM_LOAD( "qs1001a.u17", 0x200000, 0x080000, CRC(d13c6407) SHA1(57b14f97c7d4f9b5d9745d3571a0b7115fbe3176) ) /* QDSP wavetable rom */ ROM_END @@ -752,7 +752,7 @@ ROM_START( hapytour ) /* Same hardware: GHOST Ver1.1 2003.03.28 */ ROM_REGION( 0x080000, "qs1000:cpu", 0 ) ROM_LOAD( "ht.u20", 0x000000, 0x080000, CRC(c0581fce) SHA1(dafce679002534ffabed249a92e6b83301b8312b) ) - ROM_REGION( 0x1000000, "qs1000", 0 ) + ROM_REGION( 0x1000000, "qs1000", 0 ) ROM_LOAD( "ht.u16", 0x000000, 0x100000, CRC(6a590a3a) SHA1(c1140f70c919661162334db66c6aa0ad656bfc47) ) /* QDSP samples (SFX) */ ROM_LOAD( "qs1001a.u17", 0x200000, 0x080000, CRC(d13c6407) SHA1(57b14f97c7d4f9b5d9745d3571a0b7115fbe3176) ) /* QDSP wavetable rom */ ROM_END @@ -766,7 +766,7 @@ ROM_START( touryuu ) ROM_REGION( 0x080000, "qs1000:cpu", 0 ) ROM_LOAD( "4m.eeprom_c.s(bad1h).u20", 0x000000, 0x080000, CRC(f81a6530) SHA1(c7fa412102328d06823e73d7d07cadfc25db6d28) ) - ROM_REGION( 0x1000000, "qs1000", 0 ) + ROM_REGION( 0x1000000, "qs1000", 0 ) ROM_LOAD( "8m.eprom_c.s(f8b1h).u16", 0x000000, 0x100000, CRC(238a85ab) SHA1(ddd79429c0c1e67fcbca1e4ebded97ea46229f0b) ) /* QDSP samples (SFX) */ ROM_LOAD( "qs1001a.u17", 0x200000, 0x080000, CRC(d13c6407) SHA1(57b14f97c7d4f9b5d9745d3571a0b7115fbe3176) ) /* QDSP wavetable rom */ ROM_END diff --git a/src/mame/drivers/harddriv.c b/src/mame/drivers/harddriv.c index 33b08719d8..540a8b28ca 100644 --- a/src/mame/drivers/harddriv.c +++ b/src/mame/drivers/harddriv.c @@ -1599,7 +1599,7 @@ static MACHINE_CONFIG_DERIVED( steeltal, multisync_msp ) MCFG_DEVICE_REMOVE("rspeaker") MCFG_ASIC65_ADD("asic65", ASIC65_STEELTAL) /* ASIC65 on DSPCOM board */ - + /* sund hardware */ MCFG_SPEAKER_STANDARD_MONO("mono") @@ -4390,7 +4390,7 @@ void harddriv_state::init_dsk2() /* COMMON INIT: initialize the DSPCOM add-on board */ void harddriv_state::init_dspcom() { - /* install ASIC65 */ + /* install ASIC65 */ m_maincpu->space(AS_PROGRAM).install_write_handler(0x900000, 0x900003, write16_delegate(FUNC(asic65_device::data_w), (asic65_device*)m_asic65)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x900000, 0x900003, read16_delegate(FUNC(asic65_device::read), (asic65_device*)m_asic65)); m_maincpu->space(AS_PROGRAM).install_read_handler(0x901000, 0x910001, read16_delegate(FUNC(asic65_device::io_r), (asic65_device*)m_asic65)); diff --git a/src/mame/drivers/hng64.c b/src/mame/drivers/hng64.c index 5eefa9ce0b..ce6b1269ef 100644 --- a/src/mame/drivers/hng64.c +++ b/src/mame/drivers/hng64.c @@ -650,7 +650,7 @@ READ32_MEMBER(hng64_state::fight_io_r) switch (offset*4) { - case 0x000: return 0x00000400; + case 0x000: return 0x00000400; case 0x004: return ioport("SYSTEM")->read(); case 0x008: return ioport("P1_P2")->read(); case 0x600: return m_no_machine_error_code; @@ -921,9 +921,9 @@ WRITE32_MEMBER(hng64_state::dl_control_w) // This handles framebuffers clear3d(); } -// printf("%02x\n",data); +// printf("%02x\n",data); -// if(data & 1) // swap buffers? +// if(data & 1) // swap buffers? // if(data & 4) // reset buffer count } @@ -983,11 +983,11 @@ READ32_MEMBER(hng64_state::tcram_r) */ READ32_MEMBER(hng64_state::unk_vreg_r) { -// m_unk_vreg_toggle^=0x8000; +// m_unk_vreg_toggle^=0x8000; return 0; -// return ++m_unk_vreg_toggle; +// return ++m_unk_vreg_toggle; } /***** I don't think there is a soundram2, having it NOT hooked up causes xrally to copy the sound program to the expected location, see memory map note *****/ @@ -1892,11 +1892,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(hng64_state::hng64_irq) switch(scanline) { - case 224*2: m_set_irq(0x0001); break; // lv 0 vblank irq -// case 0*2: m_set_irq(0x0002); break; // lv 1 -// case 32*2: m_set_irq(0x0008); break; // lv 2 -// case 64*2: m_set_irq(0x0008); break; // lv 2 - case 128*2: m_set_irq(0x0800); break; // lv 11 network irq? + case 224*2: m_set_irq(0x0001); break; // lv 0 vblank irq +// case 0*2: m_set_irq(0x0002); break; // lv 1 +// case 32*2: m_set_irq(0x0008); break; // lv 2 +// case 64*2: m_set_irq(0x0008); break; // lv 2 + case 128*2: m_set_irq(0x0800); break; // lv 11 network irq? } } @@ -1925,11 +1925,11 @@ void hng64_state::machine_reset() m_audiocpu->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); m_audiocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); -// m_comm->set_input_line(INPUT_LINE_RESET, PULSE_LINE); // reset the CPU and let 'er rip +// m_comm->set_input_line(INPUT_LINE_RESET, PULSE_LINE); // reset the CPU and let 'er rip // m_comm->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); // hold on there pardner... // "Display List" init - ugly -// m_activeBuffer = 0; +// m_activeBuffer = 0; /* For simulate MCU stepping */ m_mcu_fake_time = 0; diff --git a/src/mame/drivers/hornet.c b/src/mame/drivers/hornet.c index d884872407..9554759bae 100644 --- a/src/mame/drivers/hornet.c +++ b/src/mame/drivers/hornet.c @@ -393,7 +393,7 @@ public: DECLARE_WRITE_LINE_MEMBER(voodoo_vblank_1); DECLARE_WRITE16_MEMBER(soundtimer_en_w); DECLARE_WRITE16_MEMBER(soundtimer_count_w); - + DECLARE_DRIVER_INIT(hornet); DECLARE_DRIVER_INIT(hornet_2board); virtual void machine_start(); diff --git a/src/mame/drivers/konamigq.c b/src/mame/drivers/konamigq.c index 271e6104b0..25971094d4 100644 --- a/src/mame/drivers/konamigq.c +++ b/src/mame/drivers/konamigq.c @@ -94,7 +94,7 @@ public: DECLARE_MACHINE_RESET(konamigq); INTERRUPT_GEN_MEMBER(tms_sync); DECLARE_WRITE_LINE_MEMBER(k054539_irq_gen); - + void scsi_dma_read( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_size ); void scsi_dma_write( UINT32 *p_n_psxram, UINT32 n_address, INT32 n_size ); }; diff --git a/src/mame/drivers/konendev.c b/src/mame/drivers/konendev.c index c982a51f43..da1a73cbb7 100644 --- a/src/mame/drivers/konendev.c +++ b/src/mame/drivers/konendev.c @@ -1,34 +1,34 @@ /* - Konami Endeavour hardware (gambling games) + Konami Endeavour hardware (gambling games) - Hardware: + Hardware: - 1. Backplane PCB (GGAT2 PWB(A1) 10000094517) - - VGA connector - - RJ45 connector + 1. Backplane PCB (GGAT2 PWB(A1) 10000094517) + - VGA connector + - RJ45 connector - 2. Main PCB (GGAT2 PWB(B2) 0000093536) - - PowerPC 403GCX - - Unknown large QFP IC under heatsink (0000057714/Firebeat GCU?) - - Xilinx CPLD - - 2 x Hynix RAM - - 4 x HY57V641620 SDRAM - - 2 x Hynix RAM (sound?) - - 2 x EPROMs - - 1 x SRAM (battery backup?) - - 2 x CR2032, 2 x supercaps - - Unknown Fujitsu IC - - YMZ280B - - Sound amplifier with heatsink + 2. Main PCB (GGAT2 PWB(B2) 0000093536) + - PowerPC 403GCX + - Unknown large QFP IC under heatsink (0000057714/Firebeat GCU?) + - Xilinx CPLD + - 2 x Hynix RAM + - 4 x HY57V641620 SDRAM + - 2 x Hynix RAM (sound?) + - 2 x EPROMs + - 1 x SRAM (battery backup?) + - 2 x CR2032, 2 x supercaps + - Unknown Fujitsu IC + - YMZ280B + - Sound amplifier with heatsink - 3. I/O PCB (GGAT2 PWB(B2) ???????????) - - H8/3001 - - EPROM socket - - Various CPLDs + 3. I/O PCB (GGAT2 PWB(B2) ???????????) + - H8/3001 + - EPROM socket + - Various CPLDs - I think they use CF cards for resources, one game has what appears to be a dump of one - but the rest don't. It's quite possibly (even likely) that all the sets here are incomplete. + I think they use CF cards for resources, one game has what appears to be a dump of one + but the rest don't. It's quite possibly (even likely) that all the sets here are incomplete. */ @@ -238,7 +238,6 @@ ROM_END DRIVER_INIT_MEMBER(konendev_state,konendev) { - } // has a flash dump? diff --git a/src/mame/drivers/lbeach.c b/src/mame/drivers/lbeach.c index abd5053d35..a405c89d8e 100644 --- a/src/mame/drivers/lbeach.c +++ b/src/mame/drivers/lbeach.c @@ -8,7 +8,7 @@ 16MHz XTAL, M6800 @ 500kHz 2x 5101 sram 256x4bit (256 byte) battery backed 4x 4045 sram 1kx4 (2K byte) - + Game should be in b&w? But then highlighted blocks in testmode would be invisible. @@ -129,7 +129,7 @@ void lbeach_state::video_start() m_fg_tilemap = &machine().tilemap().create(tilemap_get_info_delegate(FUNC(lbeach_state::get_fg_tile_info),this), TILEMAP_SCAN_ROWS, 16, 8, 32, 32); m_fg_tilemap->set_transparent_pen(0); - + m_screen->register_screen_bitmap(m_colmap_car); } @@ -151,7 +151,7 @@ UINT32 lbeach_state::screen_update_lbeach(screen_device &screen, bitmap_ind16 &b m_collision_bg_car = 0; m_collision_fg_car = 0; - + for (int y = sprite_y; y < (sprite_y + 16); y++) { for (int x = sprite_x; x < (sprite_x + 16) && cliprect.contains(x, y); x++) @@ -160,7 +160,7 @@ UINT32 lbeach_state::screen_update_lbeach(screen_device &screen, bitmap_ind16 &b m_collision_fg_car |= (fg_bitmap.pix16(y, x) & m_colmap_car.pix16(y, x) & 1); } } - + // draw fg layer (tiles) m_fg_tilemap->draw(screen, bitmap, cliprect, 0, 0); @@ -202,7 +202,7 @@ READ8_MEMBER(lbeach_state::lbeach_in2_r) // d6 and d7 are for collision detection UINT8 d6 = m_collision_fg_car ? 0x40 : 0; UINT8 d7 = m_collision_bg_car ? 0x80 : 0; - + return (ioport("IN2")->read() & 0x3f) | d6 | d7; } @@ -216,12 +216,12 @@ static ADDRESS_MAP_START( lbeach_map, AS_PROGRAM, 8, lbeach_state ) AM_RANGE(0x8000, 0x8000) AM_WRITEONLY AM_SHARE("scroll_y") AM_RANGE(0x8001, 0x8001) AM_WRITEONLY AM_SHARE("sprite_x") AM_RANGE(0x8002, 0x8002) AM_WRITEONLY AM_SHARE("sprite_code") -// AM_RANGE(0x8003, 0x8003) AM_WRITENOP // ? -// AM_RANGE(0x8004, 0x8004) AM_WRITENOP // ? -// AM_RANGE(0x8005, 0x8005) AM_WRITENOP // ? +// AM_RANGE(0x8003, 0x8003) AM_WRITENOP // ? +// AM_RANGE(0x8004, 0x8004) AM_WRITENOP // ? +// AM_RANGE(0x8005, 0x8005) AM_WRITENOP // ? AM_RANGE(0x8007, 0x8007) AM_WRITENOP // probably watchdog AM_RANGE(0xa000, 0xa000) AM_READ_PORT("IN0") -// AM_RANGE(0xa003, 0xa003) AM_READNOP // ? tests d7 at game over +// AM_RANGE(0xa003, 0xa003) AM_READNOP // ? tests d7 at game over AM_RANGE(0xc000, 0xcfff) AM_ROM AM_RANGE(0xf000, 0xffff) AM_ROM ADDRESS_MAP_END diff --git a/src/mame/drivers/legionna.c b/src/mame/drivers/legionna.c index 48f23813cf..27761ffe93 100644 --- a/src/mame/drivers/legionna.c +++ b/src/mame/drivers/legionna.c @@ -1066,7 +1066,7 @@ static MACHINE_CONFIG_START( legionna, legionna_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold)/* VBL */ SEIBU_SOUND_SYSTEM_CPU(14318180/4) - + MCFG_SEIBU_COP_ADD("seibucop") /* video hardware */ @@ -1096,7 +1096,7 @@ static MACHINE_CONFIG_START( heatbrl, legionna_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold)/* VBL */ SEIBU_SOUND_SYSTEM_CPU(14318180/4) - + MCFG_SEIBU_COP_ADD("seibucop") /* video hardware */ @@ -1125,7 +1125,7 @@ static MACHINE_CONFIG_START( godzilla, legionna_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold) SEIBU2_SOUND_SYSTEM_CPU(14318180/4) - + MCFG_SEIBU_COP_ADD("seibucop") /* video hardware */ @@ -1155,7 +1155,7 @@ static MACHINE_CONFIG_START( denjinmk, legionna_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold) SEIBU2_SOUND_SYSTEM_CPU(14318180/4) - + MCFG_SEIBU_COP_ADD("seibucop") /* video hardware */ @@ -1184,7 +1184,7 @@ static MACHINE_CONFIG_START( grainbow, legionna_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold) SEIBU2_SOUND_SYSTEM_CPU(14318180/4) - + MCFG_SEIBU_COP_ADD("seibucop") /* video hardware */ @@ -1214,7 +1214,7 @@ static MACHINE_CONFIG_START( cupsoc, legionna_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold)/* VBL */ SEIBU_SOUND_SYSTEM_CPU(14318180/4) - + MCFG_SEIBU_COP_ADD("seibucop") /* video hardware */ @@ -1248,7 +1248,7 @@ static MACHINE_CONFIG_START( cupsocbl, legionna_state ) MCFG_CPU_VBLANK_INT_DRIVER("screen", legionna_state, irq4_line_hold) /* VBL */ MCFG_SEIBU_COP_ADD("seibucop") - + /*Different Sound hardware*/ //SEIBU_SOUND_SYSTEM_CPU(14318180/4) MCFG_CPU_ADD("audiocpu", Z80,14318180/4) diff --git a/src/mame/drivers/lethal.c b/src/mame/drivers/lethal.c index 49461a8048..634ac7f3db 100644 --- a/src/mame/drivers/lethal.c +++ b/src/mame/drivers/lethal.c @@ -561,16 +561,16 @@ static INPUT_PORTS_START( lethalen ) PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_er5911_device, ready_read) PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR(Language) ) PORT_DIPLOCATION("DSW:4") + PORT_DIPNAME( 0x10, 0x10, DEF_STR(Language) ) PORT_DIPLOCATION("DSW:4") PORT_DIPSETTING( 0x10, DEF_STR(English) ) PORT_DIPSETTING( 0x00, DEF_STR(Spanish) ) - PORT_DIPNAME( 0x20, 0x00, "Game Type" ) PORT_DIPLOCATION("DSW:3") + PORT_DIPNAME( 0x20, 0x00, "Game Type" ) PORT_DIPLOCATION("DSW:3") PORT_DIPSETTING( 0x20, "Street" ) PORT_DIPSETTING( 0x00, "Arcade" ) - PORT_DIPNAME( 0x40, 0x40, "Coin Mechanism" ) PORT_DIPLOCATION("DSW:2") + PORT_DIPNAME( 0x40, 0x40, "Coin Mechanism" ) PORT_DIPLOCATION("DSW:2") PORT_DIPSETTING( 0x40, "Common" ) PORT_DIPSETTING( 0x00, "Independent" ) - PORT_DIPNAME( 0x80, 0x80, "Sound Output" ) PORT_DIPLOCATION("DSW:1") + PORT_DIPNAME( 0x80, 0x80, "Sound Output" ) PORT_DIPLOCATION("DSW:1") PORT_DIPSETTING( 0x00, DEF_STR( Mono ) ) PORT_DIPSETTING( 0x80, DEF_STR( Stereo ) ) @@ -595,13 +595,13 @@ INPUT_PORTS_END static INPUT_PORTS_START( lethalenj ) PORT_INCLUDE( lethalen ) - PORT_MODIFY("DSW") /* Normal DIPs appear to do nothing for Japan region - wrong location? Set to unknown */ - PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSW:4") - PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSW:3") - PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSW:2") - PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSW:1") + PORT_MODIFY("DSW") /* Normal DIPs appear to do nothing for Japan region - wrong location? Set to unknown */ + PORT_DIPUNKNOWN_DIPLOC( 0x10, 0x10, "DSW:4") + PORT_DIPUNKNOWN_DIPLOC( 0x20, 0x20, "DSW:3") + PORT_DIPUNKNOWN_DIPLOC( 0x40, 0x40, "DSW:2") + PORT_DIPUNKNOWN_DIPLOC( 0x80, 0x80, "DSW:1") - PORT_MODIFY("LIGHT0_X") + PORT_MODIFY("LIGHT0_X") PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_REVERSE PORT_MODIFY("LIGHT0_Y") @@ -618,7 +618,7 @@ static INPUT_PORTS_START( lethalene ) /* European region does not have non-engli PORT_INCLUDE( lethalen ) PORT_MODIFY("DSW") - PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "DSW:4") + PORT_DIPUNUSED_DIPLOC( 0x10, 0x10, "DSW:4") INPUT_PORTS_END static const gfx_layout lethal_6bpp = diff --git a/src/mame/drivers/maygayv1.c b/src/mame/drivers/maygayv1.c index 5659c2defd..10504ab938 100644 --- a/src/mame/drivers/maygayv1.c +++ b/src/mame/drivers/maygayv1.c @@ -227,7 +227,7 @@ public: required_device m_soundcpu; required_device m_upd7759; required_device m_duart68681; - + int m_vsync_latch_preset; UINT8 m_p1; UINT8 m_p3; diff --git a/src/mame/drivers/mcr3.c b/src/mame/drivers/mcr3.c index 5bbdf40b9e..63e7a1a2ad 100644 --- a/src/mame/drivers/mcr3.c +++ b/src/mame/drivers/mcr3.c @@ -536,32 +536,26 @@ ADDRESS_MAP_END WRITE8_MEMBER(mcr3_state::spyhuntpr_a800_w) { - } WRITE8_MEMBER(mcr3_state::spyhuntpr_a801_w) { - } WRITE8_MEMBER(mcr3_state::spyhuntpr_a802_w) { - } WRITE8_MEMBER(mcr3_state::spyhuntpr_a803_w) { - } WRITE8_MEMBER(mcr3_state::spyhuntpr_a900_w) { - } WRITE8_MEMBER(mcr3_state::spyhuntpr_fd00_w) { - } static ADDRESS_MAP_START( spyhuntpr_map, AS_PROGRAM, 8, mcr3_state ) @@ -579,12 +573,12 @@ static ADDRESS_MAP_START( spyhuntpr_map, AS_PROGRAM, 8, mcr3_state ) AM_RANGE(0xf000, 0xf7ff) AM_RAM //AM_SHARE("nvram") AM_RANGE(0xf800, 0xf9ff) AM_RAM AM_SHARE("spriteram") AM_RANGE(0xfa00, 0xfa7f) AM_MIRROR(0x0180) AM_RAM AM_WRITE(spyhuntpr_paletteram_w) AM_SHARE("paletteram") - + AM_RANGE(0xfc00, 0xfc00) AM_READ_PORT("DSW0") AM_RANGE(0xfc01, 0xfc01) AM_READ_PORT("DSW1") AM_RANGE(0xfc02, 0xfc02) AM_READ_PORT("IN2") AM_RANGE(0xfc03, 0xfc03) AM_READ_PORT("IN3") - + AM_RANGE(0xfd00, 0xfd00) AM_WRITE( spyhuntpr_fd00_w ) AM_RANGE(0xfe00, 0xffff) AM_RAM // a modified copy of spriteram for this hw?? @@ -592,7 +586,6 @@ ADDRESS_MAP_END WRITE8_MEMBER(mcr3_state::spyhuntpr_port04_w) { - } static ADDRESS_MAP_START( spyhuntpr_portmap, AS_IO, 8, mcr3_state ) @@ -601,7 +594,7 @@ static ADDRESS_MAP_START( spyhuntpr_portmap, AS_IO, 8, mcr3_state ) AM_RANGE(0x04, 0x04) AM_WRITE(spyhuntpr_port04_w) AM_RANGE(0x84, 0x86) AM_WRITE(spyhunt_scroll_value_w) AM_RANGE(0xe0, 0xe0) AM_WRITENOP // was watchdog -// AM_RANGE(0xe8, 0xe8) AM_WRITENOP +// AM_RANGE(0xe8, 0xe8) AM_WRITENOP AM_RANGE(0xf0, 0xf3) AM_DEVREADWRITE("ctc", z80ctc_device, read, write) ADDRESS_MAP_END @@ -1404,7 +1397,7 @@ MACHINE_CONFIG_END static ADDRESS_MAP_START( spyhuntpr_sound_map, AS_PROGRAM, 8, mcr3_state ) AM_RANGE(0x0000, 0x1fff) AM_ROM AM_RANGE(0x8000, 0x83ff) AM_RAM -// AM_RANGE(0xfe00, 0xffff) AM_RAM +// AM_RANGE(0xfe00, 0xffff) AM_RAM ADDRESS_MAP_END static ADDRESS_MAP_START( spyhuntpr_sound_portmap, AS_IO, 8, mcr3_state ) @@ -1437,9 +1430,9 @@ static MACHINE_CONFIG_START( spyhuntpr, mcr3_state ) MCFG_MACHINE_START_OVERRIDE(mcr3_state,mcr) MCFG_MACHINE_RESET_OVERRIDE(mcr3_state,mcr) -// MCFG_NVRAM_ADD_0FILL("nvram") +// MCFG_NVRAM_ADD_0FILL("nvram") + - /* video hardware */ MCFG_VIDEO_ATTRIBUTES(VIDEO_UPDATE_BEFORE_VBLANK) @@ -1461,7 +1454,7 @@ static MACHINE_CONFIG_START( spyhuntpr, mcr3_state ) MCFG_CPU_ADD("audiocpu", Z80, 3000000 ) MCFG_CPU_PROGRAM_MAP(spyhuntpr_sound_map) MCFG_CPU_IO_MAP(spyhuntpr_sound_portmap) -// MCFG_CPU_PERIODIC_INT_DRIVER(mcr3_state, irq0_line_hold, 4*60) +// MCFG_CPU_PERIODIC_INT_DRIVER(mcr3_state, irq0_line_hold, 4*60) MCFG_SPEAKER_STANDARD_MONO("mono") @@ -1787,7 +1780,7 @@ ROM_START( spyhuntpr ) ROM_CONTINUE(0x3002, 0x200) ROM_CONTINUE(0x3003, 0x200) ROM_CONTINUE(0x3802, 0x200) - ROM_CONTINUE(0x3803, 0x200) + ROM_CONTINUE(0x3803, 0x200) ROM_LOAD32_BYTE( "8.bin", 0x4000, 0x200, CRC(e699b329) SHA1(cb4b8c7b6fa1cb1144a18f1442dc3b267c408914) ) ROM_CONTINUE(0x4001, 0x200) ROM_CONTINUE(0x4800, 0x200) @@ -1819,7 +1812,7 @@ ROM_START( spyhuntpr ) ROM_CONTINUE(0x7002, 0x200) ROM_CONTINUE(0x7003, 0x200) ROM_CONTINUE(0x7802, 0x200) - ROM_CONTINUE(0x7803, 0x200) + ROM_CONTINUE(0x7803, 0x200) ROM_REGION( 0x10000, "gfx2", ROMREGION_INVERT ) ROM_LOAD( "10.bin", 0x00000, 0x4000, CRC(6f9fd416) SHA1(a51c86e5b22c91fc44673f53400b58af40b18065) ) @@ -1994,9 +1987,9 @@ DRIVER_INIT_MEMBER(mcr3_state,spyhunt) DRIVER_INIT_MEMBER(mcr3_state,spyhuntpr) { mcr_common_init(); -// machine().device("ssio")->set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),this)); -// machine().device("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::spyhunt_ip2_r),this)); -// machine().device("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),this)); +// machine().device("ssio")->set_custom_input(1, 0x60, read8_delegate(FUNC(mcr3_state::spyhunt_ip1_r),this)); +// machine().device("ssio")->set_custom_input(2, 0xff, read8_delegate(FUNC(mcr3_state::spyhunt_ip2_r),this)); +// machine().device("ssio")->set_custom_output(4, 0xff, write8_delegate(FUNC(mcr3_state::spyhunt_op4_w),this)); m_spyhunt_sprite_color_mask = 0x00; m_spyhunt_scroll_offset = 16; diff --git a/src/mame/drivers/meritm.c b/src/mame/drivers/meritm.c index 237f7472be..88f1527898 100644 --- a/src/mame/drivers/meritm.c +++ b/src/mame/drivers/meritm.c @@ -1484,7 +1484,7 @@ ROM_START( megat2 ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 */ ROM_RELOAD( 0x380000, 0x080000) ROM_REGION( 0x000022, "ds1204", 0 ) - ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) + ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) ROM_END ROM_START( megat2a ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 */ @@ -1499,7 +1499,7 @@ ROM_START( megat2a ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 * ROM_RELOAD( 0x380000, 0x080000) ROM_REGION( 0x000022, "ds1204", 0 ) - ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) + ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) ROM_END ROM_START( megat2b ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 */ @@ -1514,7 +1514,7 @@ ROM_START( megat2b ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 * ROM_RELOAD( 0x380000, 0x080000) ROM_REGION( 0x000022, "ds1204", 0 ) - ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) + ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) ROM_END ROM_START( megat2mn ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 */ @@ -1529,7 +1529,7 @@ ROM_START( megat2mn ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 ROM_RELOAD( 0x380000, 0x080000) ROM_REGION( 0x000022, "ds1204", 0 ) - ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) + ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) ROM_END ROM_START( megat2ca ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 */ @@ -1544,7 +1544,7 @@ ROM_START( megat2ca ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 ROM_RELOAD( 0x380000, 0x080000) ROM_REGION( 0x000022, "ds1204", 0 ) - ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) + ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) ROM_END ROM_START( megat2caa ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 */ @@ -1559,7 +1559,7 @@ ROM_START( megat2caa ) /* Dallas DS1204U-3 security key labeled 9255-10-01-U5-R0 ROM_RELOAD( 0x380000, 0x080000) ROM_REGION( 0x000022, "ds1204", 0 ) - ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) + ROM_LOAD( "9255-10-01-u5-r0", 0x000000, 0x000022, BAD_DUMP CRC(b13c68d2) SHA1(99f9584ba005d32ad8abefd64159a8c296dcd580) ) ROM_END ROM_START( megat3 ) /* Dallas DS1204V security key at U5 labeled 9255-20-01 U5-RO1 C1995 MII */ diff --git a/src/mame/drivers/midyunit.c b/src/mame/drivers/midyunit.c index 390be2b153..ef2c2686f4 100644 --- a/src/mame/drivers/midyunit.c +++ b/src/mame/drivers/midyunit.c @@ -412,17 +412,17 @@ static INPUT_PORTS_START( hiimpact ) PORT_DIPSETTING( 0x0058, DEF_STR( 2C_1C )) PORT_CONDITION("DSW", 0xc000, EQUALS, 0xc000) PORT_DIPSETTING( 0x0068, "2 Coins/1 Credit 4/3" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0xc000) PORT_DIPSETTING( 0x0048, "2 Coins/1 Credit 4/4" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0xc000) - PORT_DIPSETTING( 0x0070, "ECA" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0xc000) /* 25 cents; 4 chutes - dollar/quarter/dime/nickel */ + PORT_DIPSETTING( 0x0070, "ECA" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0xc000) /* 25 cents; 4 chutes - dollar/quarter/dime/nickel */ PORT_DIPSETTING( 0x0078, "1DM/1 Credit 6/5" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x4000) /* German coinage; these 4 have 2 chutes (1DM/5DM) */ PORT_DIPSETTING( 0x0058, "1DM/1 Credit 7/5" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x4000) PORT_DIPSETTING( 0x0068, "1DM/1 Credit 8/5" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x4000) PORT_DIPSETTING( 0x0048, "1DM/1 Credit" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x4000) - PORT_DIPSETTING( 0x0070, "ECA" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x4000) /* 1/1DM 6/5DM; 3 chutes (5DM/2DM/1DM) */ + PORT_DIPSETTING( 0x0070, "ECA" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x4000) /* 1/1DM 6/5DM; 3 chutes (5DM/2DM/1DM) */ PORT_DIPSETTING( 0x0078, "5F/2 Credits 10/5" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x8000) /* French coinage; 2 chutes (5F/10F) */ PORT_DIPSETTING( 0x0058, "5F/2 Credits" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x8000) PORT_DIPSETTING( 0x0068, "5F/1 Credit 10/3" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x8000) PORT_DIPSETTING( 0x0048, "5F/1 Credit" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x8000) - PORT_DIPSETTING( 0x0070, "ECA" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x8000) /* 1/3F 2/5F 5/10F; 3 chutes (1F/5F/10F) */ + PORT_DIPSETTING( 0x0070, "ECA" ) PORT_CONDITION("DSW", 0xc000, EQUALS, 0x8000) /* 1/3F 2/5F 5/10F; 3 chutes (1F/5F/10F) */ PORT_DIPSETTING( 0x0040, DEF_STR( Free_Play )) PORT_DIPSETTING( 0x0038, "Other (See Service Menu)" ) PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Players )) PORT_DIPLOCATION("SW1:1") diff --git a/src/mame/drivers/midzeus.c b/src/mame/drivers/midzeus.c index 84cf38b466..fb871fa8dc 100644 --- a/src/mame/drivers/midzeus.c +++ b/src/mame/drivers/midzeus.c @@ -1271,8 +1271,8 @@ ROM_START( invasnab3 ) /* Version 3.0 Program roms & v2.0 Graphics roms, v2.0 So ROM_LOAD32_WORD( "invasion2.u15", 0x0800002, 0x200000, CRC(584b0596) SHA1(cab8222977ecc8a689f1f3f7ebc38ff7bec6a43f) ) ROM_LOAD32_WORD( "invasion2.u16", 0x0c00000, 0x200000, CRC(5d422855) SHA1(ceafd60b020b03de051765b9e9dd0d01285a0335) ) ROM_LOAD32_WORD( "invasion2.u17", 0x0c00002, 0x200000, CRC(c6555769) SHA1(a97361001311dd6fb28f79df422e6e8c27ea2495) ) - ROM_LOAD32_WORD( "invasion2.u18", 0x1000000, 0x200000, CRC(dbc9548e) SHA1(6deac9fde26144a61bd63833a197801d159f0c9a) ) - ROM_LOAD32_WORD( "invasion2.u19", 0x1000002, 0x200000, CRC(4b05a2a9) SHA1(3d47c22a809f5883e4795a9153161d3e29c64662) ) + ROM_LOAD32_WORD( "invasion2.u18", 0x1000000, 0x200000, CRC(dbc9548e) SHA1(6deac9fde26144a61bd63833a197801d159f0c9a) ) + ROM_LOAD32_WORD( "invasion2.u19", 0x1000002, 0x200000, CRC(4b05a2a9) SHA1(3d47c22a809f5883e4795a9153161d3e29c64662) ) ROM_END ROM_START( crusnexo ) diff --git a/src/mame/drivers/multigam.c b/src/mame/drivers/multigam.c index bdf275ea0b..b782149520 100644 --- a/src/mame/drivers/multigam.c +++ b/src/mame/drivers/multigam.c @@ -119,11 +119,11 @@ public: m_maincpu(*this, "maincpu"), m_nesapu(*this, "nesapu"), m_ppu(*this, "ppu") { } - + required_device m_maincpu; required_device m_nesapu; required_device m_ppu; - + UINT8* m_nt_ram; UINT8* m_vram; UINT8* m_nt_page[4]; @@ -875,7 +875,7 @@ WRITE8_MEMBER(multigam_state::mmc1_rom_switch_w) void multigam_state::multigam_init_mmc1(UINT8 *prg_base, int prg_size, int chr_bank_base) { UINT8* dst = memregion("maincpu")->base(); - + memcpy(&dst[0x8000], prg_base + (prg_size - 0x8000), 0x8000); m_maincpu->space(AS_PROGRAM).install_write_handler(0x8000, 0xffff, write8_delegate(FUNC(multigam_state::mmc1_rom_switch_w),this)); diff --git a/src/mame/drivers/mw18w.c b/src/mame/drivers/mw18w.c index 42defba612..e7c4d1daba 100644 --- a/src/mame/drivers/mw18w.c +++ b/src/mame/drivers/mw18w.c @@ -63,7 +63,7 @@ WRITE8_MEMBER(mw18w_state::mw18w_sound1_w) // d0-d5: engine sound // d6: bell sound // d7: backdrop lamp dim control - + output_set_lamp_value(80, data >> 7 & 1); } @@ -71,16 +71,16 @@ WRITE8_MEMBER(mw18w_state::mw18w_lamps_w) { // d0-3, d7: selected rows int rows = (data & 0xf) | (data >> 3 & 0x10); - + // d4-d6: column int col = data >> 4 & 7; - + // refresh lamp status for (int i = 0; i < 5; i++) output_set_lamp_value(col * 10 + i, rows >> i & 1); /* lamps info: - + 00: upper right load zone 01: lower right load zone 02: lost cargo @@ -128,9 +128,9 @@ WRITE8_MEMBER(mw18w_state::mw18w_lamps_w) 72: extended play 73: credit 74: game over - + (80: backdrop dim) - + */ } diff --git a/src/mame/drivers/naomi.c b/src/mame/drivers/naomi.c index aafbf802bd..a94a083b34 100644 --- a/src/mame/drivers/naomi.c +++ b/src/mame/drivers/naomi.c @@ -3955,18 +3955,18 @@ ROM_START( tduno ) ROM_LOAD16_WORD("main_eeprom.bin", 0x0000, 0x0080, CRC(fea29cbb) SHA1(4099f1747aafa07db34f6e072cd9bfaa83bae10e) ) ROM_REGION( 0x4000000, "rom_board", ROMREGION_ERASEFF) - ROM_LOAD( "epr-22073.ic22", 0x0000000, 0x200000, CRC(dbeee93c) SHA1(95a761aa07b231f36e1656f46d3a711a4eea0210) ) - ROM_LOAD( "mpr-22074.ic1", 0x0800000, 0x800000, CRC(fd6070a4) SHA1(8fb01c39e5deb002401b971aa415f7d7e220134d) ) - ROM_LOAD( "mpr-22075.ic2", 0x1000000, 0x800000, CRC(4c11d298) SHA1(d4edfd2a2c81dd45356ee53de27a86e04a13011b) ) - ROM_LOAD( "mpr-22076.ic3", 0x1800000, 0x800000, CRC(e4c98898) SHA1(c13c842874a9266a7bd5856f298687e0f8c07fc1) ) - ROM_LOAD( "mpr-22077.ic4", 0x2000000, 0x400000, CRC(f33d7620) SHA1(82c3e2bb6feed68670798efa3e17c9f6d6d0070a) ) + ROM_LOAD( "epr-22073.ic22", 0x0000000, 0x200000, CRC(dbeee93c) SHA1(95a761aa07b231f36e1656f46d3a711a4eea0210) ) + ROM_LOAD( "mpr-22074.ic1", 0x0800000, 0x800000, CRC(fd6070a4) SHA1(8fb01c39e5deb002401b971aa415f7d7e220134d) ) + ROM_LOAD( "mpr-22075.ic2", 0x1000000, 0x800000, CRC(4c11d298) SHA1(d4edfd2a2c81dd45356ee53de27a86e04a13011b) ) + ROM_LOAD( "mpr-22076.ic3", 0x1800000, 0x800000, CRC(e4c98898) SHA1(c13c842874a9266a7bd5856f298687e0f8c07fc1) ) + ROM_LOAD( "mpr-22077.ic4", 0x2000000, 0x400000, CRC(f33d7620) SHA1(82c3e2bb6feed68670798efa3e17c9f6d6d0070a) ) // on-cart X76F100 eeprom contents ROM_REGION( 0x84, "naomibd_eeprom", 0 ) - ROM_LOAD( "x76f100.ic37", 0x000000, 0x000084, CRC(c79251d5) SHA1(3e70bbbb6d28bade7eec7e27d716463045656f98) ) + ROM_LOAD( "x76f100.ic37", 0x000000, 0x000084, CRC(c79251d5) SHA1(3e70bbbb6d28bade7eec7e27d716463045656f98) ) ROM_REGION( 4, "rom_key", 0 ) - ROM_LOAD( "tduno.key", 0x000000, 0x000004, CRC(217ce9d0) SHA1(39d71a84b2769cd0c1521ddf1c617c18f577020c) ) + ROM_LOAD( "tduno.key", 0x000000, 0x000004, CRC(217ce9d0) SHA1(39d71a84b2769cd0c1521ddf1c617c18f577020c) ) ROM_END ROM_START( tduno2 ) @@ -5645,8 +5645,8 @@ ROM_START( wldkicksa ) NAOMI_DEFAULT_EEPROM ROM_REGION( 0xb000000, "rom_board", ROMREGION_ERASEFF) - ROM_LOAD( "wk3vera_fl1.2d", 0x0400000, 0x800000, CRC(cfdd5c5d) SHA1(ffc5d38edb600462574d4ed8ce5ada8625d59c74) ) - ROM_LOAD( "wk3vera_fl2.2c", 0x0c00000, 0x800000, CRC(ad2577d5) SHA1(f7b6bab001c5f5cf0b33a70cd0dfdca8f7d25921) ) + ROM_LOAD( "wk3vera_fl1.2d", 0x0400000, 0x800000, CRC(cfdd5c5d) SHA1(ffc5d38edb600462574d4ed8ce5ada8625d59c74) ) + ROM_LOAD( "wk3vera_fl2.2c", 0x0c00000, 0x800000, CRC(ad2577d5) SHA1(f7b6bab001c5f5cf0b33a70cd0dfdca8f7d25921) ) ROM_LOAD( "wk1ma2.4m", 0x1000000, 0x1000000, CRC(650590ec) SHA1(bb9d5d5df2321df24ee0fb9e8bf2757d5277f8ea) ) ROM_RELOAD( 0x800000, 0x400000) ROM_LOAD( "wk1ma3.4l", 0x2000000, 0x1000000, CRC(3b340dc0) SHA1(2412e41d5bd74d1233fb91f8ce2276a318bfc53d) ) diff --git a/src/mame/drivers/peplus.c b/src/mame/drivers/peplus.c index 973bb7b26e..db7a176b89 100644 --- a/src/mame/drivers/peplus.c +++ b/src/mame/drivers/peplus.c @@ -5534,7 +5534,7 @@ The CG2298 graphics can support the following XnnnnnnP Data game types: Super Aces shows as just Bonus Poker Triple Bonus Poker Plus shows as just Triple Bonus - + */ ROM_REGION( 0x10000, "maincpu", 0 ) ROM_LOAD( "xmp00017.u67", 0x00000, 0x10000, CRC(129e6eaa) SHA1(1dd2b83a672a618f338b553a6cbd598b6d4ce672) ) diff --git a/src/mame/drivers/pgm.c b/src/mame/drivers/pgm.c index 4917ed3d27..c6c3b1ba35 100644 --- a/src/mame/drivers/pgm.c +++ b/src/mame/drivers/pgm.c @@ -483,8 +483,8 @@ TIMER_DEVICE_CALLBACK_MEMBER(pgm_state::pgm_interrupt) int scanline = param; // already being generated by MCFG_CPU_VBLANK_INT_DRIVER("screen", pgm_state, irq6_line_hold) -// if(scanline == 224) -// m_maincpu->set_input_line(6, HOLD_LINE); +// if(scanline == 224) +// m_maincpu->set_input_line(6, HOLD_LINE); if(scanline == 0) if (!m_irq4_disabled) m_maincpu->set_input_line(4, HOLD_LINE); @@ -3288,11 +3288,11 @@ ROM_END ROM_START( thegladpcb ) ROM_REGION( 0x600000, "maincpu", 0 ) /* 68000 Code */ ROM_LOAD16_WORD_SWAP( "bios.42", 0x000000, 0x020000, CRC(517cf7a2) SHA1(f5720b29e3be6ec22be03a768618cb2a1aa4ade7) ) - ROM_LOAD16_WORD_SWAP( "glad_v100.43", 0x100000, 0x080000, CRC(bcf3b172) SHA1(df7e2808c0341be0a59eefa852c857a3a919223e) ) + ROM_LOAD16_WORD_SWAP( "glad_v100.43", 0x100000, 0x080000, CRC(bcf3b172) SHA1(df7e2808c0341be0a59eefa852c857a3a919223e) ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ ROM_LOAD( "thegladpcb_igs027a_execute_only_area", 0x0000, 0x00188, NO_DUMP ) - ROM_LOAD( "thegladpcb_igs027a_v100_japan.bin", 0x0188, 0x3e78, CRC(d7f06e2d) SHA1(9c3aca7a487f5329d84731e2c63d5ed591bf9d24) ) // from 'thegladpcb set' + ROM_LOAD( "thegladpcb_igs027a_v100_japan.bin", 0x0188, 0x3e78, CRC(d7f06e2d) SHA1(9c3aca7a487f5329d84731e2c63d5ed591bf9d24) ) // from 'thegladpcb set' ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data, internal missing) */ ROM_LOAD( "igs_v100.62", 0x000000, 0x200000, CRC(0f3f511e) SHA1(28dd8d27495cec86e968a3ea549c5b30513dbb6e) ) @@ -3581,7 +3581,7 @@ ROM_START( killbldp ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ /* the first 0x268 bytes of this are EXECUTE ONLY in the original chip, attempting to read them even via the original CPU just returns what is on the bus */ -// ROM_LOAD( "killbldp_igs027a.bin", 0x000000, 0x04000, CRC(c7868d90) SHA1(335c99933a38b77fcfc3f8004063f35124364f3e) ) // this is the original rom with the first 0x268 bytes from the bootleg - but it doesn't work? +// ROM_LOAD( "killbldp_igs027a.bin", 0x000000, 0x04000, CRC(c7868d90) SHA1(335c99933a38b77fcfc3f8004063f35124364f3e) ) // this is the original rom with the first 0x268 bytes from the bootleg - but it doesn't work? /* there are some differences around 0x2e80, investigate - maybe above is badly dumped?, padding at 0x3ac0 is also different */ ROM_LOAD( "killbldp_igs027a_alt.bin", 0x000000, 0x04000, CRC(98316b06) SHA1(09be9fad24d68980a0a5beae60ced48012286216) ) // from a bootleg @@ -3614,7 +3614,7 @@ ROM_START( svg ) ROM_LOAD16_WORD_SWAP( "u30.bin", 0x100000, 0x080000, CRC(34c18f3f) SHA1(42d1edd0dcfaa5e44861c6a1d4cb24f51ba23de8) ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ -// ROM_LOAD( "svg_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) // different from PCB version.. +// ROM_LOAD( "svg_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) // different from PCB version.. ROM_LOAD( "svg_igs027a_execute_only_area", 0x0000, 0x00188, NO_DUMP ) ROM_LOAD( "svg_igs027a.bin", 0x0188, 0x3e78, BAD_DUMP CRC(7a59da5d) SHA1(d67ba465db40ca716b4b901b1c8e762716fb954e) ) // taken from svgpcb @@ -3652,7 +3652,7 @@ ROM_START( svgpcb ) ROM_LOAD( "svgpcb_igs027a_execute_only_area", 0x0000, 0x00188, NO_DUMP ) ROM_LOAD( "svgcpb_igs027a_v100_japan.bin", 0x0188, 0x3e78, CRC(7a59da5d) SHA1(d67ba465db40ca716b4b901b1c8e762716fb954e) ) - + ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */ ROM_LOAD( "svg_v100jp.u64", 0x000000, 0x400000, CRC(399d4a8b) SHA1(b120e8386a259e6fd7941acf3c33cf288eda616c) ) ROM_LOAD( "svg_v100jp.u65", 0x400000, 0x400000, CRC(6e1c33b1) SHA1(66f26b2f4c0b3dcf6d1bb1df48e2ddbcc9d9432d) ) @@ -3685,10 +3685,10 @@ ROM_START( happy6 ) ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */ // data before 0x188 is read-protected and cannot be read even with a trojan (as with most 2001/2+ IGS titles) -// ROM_LOAD( "happy6_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) +// ROM_LOAD( "happy6_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) // for testing only, this is from the gladiator and wrong for this game. ROM_LOAD( "happy6_igs027a_execute_only_area", 0x0000, 0x00188, NO_DUMP ) - ROM_LOAD( "happy6_igs027a_v100_japan.bin", 0x0188, 0x3e78, BAD_DUMP CRC(d7f06e2d) SHA1(9c3aca7a487f5329d84731e2c63d5ed591bf9d24) ) // from 'thegladpcb set' + ROM_LOAD( "happy6_igs027a_v100_japan.bin", 0x0188, 0x3e78, BAD_DUMP CRC(d7f06e2d) SHA1(9c3aca7a487f5329d84731e2c63d5ed591bf9d24) ) // from 'thegladpcb set' ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */ @@ -4175,7 +4175,7 @@ GAME( 2005, killbldp, pgm, pgm_arm_type3, pgm, pgm_arm_type3_state GAME( 2003, theglad, pgm, pgm_arm_type3, theglad, pgm_arm_type3_state, theglad, ROT0, "IGS", "The Gladiator / Road of the Sword / Shen Jian (M68k label V101) (ARM label V107, ROM 06/06/03 SHEN JIAN V107)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // ARM time: 16:17:27 GAME( 2003, theglad101, theglad, pgm_arm_type3, theglad, pgm_arm_type3_state, theglad, ROT0, "IGS", "The Gladiator / Road of the Sword / Shen Jian (M68k label V100) (ARM label V101, ROM 03/13/03 SHEN JIAN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) // ARM time: 14:06:44 // the v100 68k ROM on this is older than the v101 set, this set also uses a different internal ROM to everything else, must be a very early release, maybe pre v100 proto with v100 strings? -GAME( 2003, theglad100, theglad, pgm_arm_type3, theglad, pgm_arm_type3_state, theglada, ROT0, "IGS", "The Gladiator / Road of the Sword / Shen Jian (M68k label V100) (ARM label V100, ROM 01/16/03 SHEN JIAN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) /* need correct internal rom of IGS027A - we currently patch the one we have */ // ARM time: 10:39:25 +GAME( 2003, theglad100, theglad, pgm_arm_type3, theglad, pgm_arm_type3_state, theglada, ROT0, "IGS", "The Gladiator / Road of the Sword / Shen Jian (M68k label V100) (ARM label V100, ROM 01/16/03 SHEN JIAN)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE ) /* need correct internal rom of IGS027A - we currently patch the one we have */ // ARM time: 10:39:25 // newer than ARM V100 Cart, older than ARM V101 Cart, same 68k rom as V101 Cart. GAME( 2003, thegladpcb, theglad, pgm_arm_type3, pgm, pgm_arm_type3_state, theglad, ROT0, "IGS", "The Gladiator / Road of the Sword / Shen Jian (M68k label V100) (ARM label V100, ROM 02/25/03 SHEN JIAN) (Japan, JAMMA PCB)", GAME_IMPERFECT_SOUND | GAME_SUPPORTS_SAVE )// ARM time: 16:32:21 // PCB version only released in Japan? diff --git a/src/mame/drivers/pinkiri8.c b/src/mame/drivers/pinkiri8.c index 3399c87c1d..f6c13b9348 100644 --- a/src/mame/drivers/pinkiri8.c +++ b/src/mame/drivers/pinkiri8.c @@ -198,17 +198,17 @@ void pinkiri8_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec { /* "vram1" (video map 0xfc2000) - tttt tttt | 00tt tttt | cccc c000 | xxxx xxxx | + tttt tttt | 00tt tttt | cccc c000 | xxxx xxxx | - "vram2" (video map 0xfc3800) + "vram2" (video map 0xfc3800) - yyyy yyyy | ???? ???? | + yyyy yyyy | ???? ???? | - widths come from "widthflags" (0xfc3780) - "unk1" (0xfc3700) and "unk2" (0xfc37c0) are a mystery + widths come from "widthflags" (0xfc3780) + "unk1" (0xfc3700) and "unk2" (0xfc37c0) are a mystery - */ + */ spr_offs = ((m_janshi_vram1[(i*4)+0] & 0xff) | (m_janshi_vram1[(i*4)+1]<<8)) & 0xffff; col = (m_janshi_vram1[(i*4)+2] & 0xf8) >> 3; @@ -321,7 +321,6 @@ void pinkiri8_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprec UINT32 pinkiri8_state::screen_update_pinkiri8(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { - /* update palette */ for (int pen = 0; pen < 0x800 ; pen++) { diff --git a/src/mame/drivers/plygonet.c b/src/mame/drivers/plygonet.c index 98a31c4ac7..269aa3eb65 100644 --- a/src/mame/drivers/plygonet.c +++ b/src/mame/drivers/plygonet.c @@ -546,7 +546,7 @@ WRITE8_MEMBER(polygonet_state::sound_ctrl_w) { // .... .xxx - Sound bank // ...x .... - NMI clear (clocked?) - + if ((m_sound_ctrl & 7) != (data & 7)) membank("bank1")->set_entry(data & 7); diff --git a/src/mame/drivers/pong.c b/src/mame/drivers/pong.c index c88c6e51bb..272e6054e2 100644 --- a/src/mame/drivers/pong.c +++ b/src/mame/drivers/pong.c @@ -148,7 +148,7 @@ static NETLIST_START(pong_schematics) // ---------------------------------------------------------------------------------------- // horizontal counter - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7493(ic_f8, clk, ic_f8.QA, ic_e7b.QQ, ic_e7b.QQ) // f8, f9, f6b TTL_7493(ic_f9, ic_f8.QD, ic_f9.QA, ic_e7b.QQ, ic_e7b.QQ) // f8, f9, f6b TTL_74107(ic_f6b, ic_f9.QD, high, high, ic_e7b.Q) @@ -166,9 +166,9 @@ static NETLIST_START(pong_schematics) NET_ALIAS(256H, ic_f6b.Q) NET_ALIAS(256HQ, ic_f6b.QQ) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // vertical counter - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7493(ic_e8, hreset, ic_e8.QA, ic_e7a.QQ, ic_e7a.QQ) // e8, e9, d9b TTL_7493(ic_e9, ic_e8.QD,ic_e9.QA, ic_e7a.QQ, ic_e7a.QQ) // e8, e9, d9b TTL_74107(ic_d9b, ic_e9.QD, high, high, ic_e7a.Q) @@ -186,9 +186,9 @@ static NETLIST_START(pong_schematics) NET_ALIAS(256VQ, ic_d9b.QQ) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // hblank flip flop - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7400_NAND(ic_g5b, 16H, 64H) @@ -200,9 +200,9 @@ static NETLIST_START(pong_schematics) NET_ALIAS(hblankQ, ic_h5b.Q) TTL_7400_NAND(hsyncQ, hblank, 32H) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // vblank flip flop - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7402_NOR(ic_f5c, ic_f5d.Q, vreset) TTL_7402_NOR(ic_f5d, ic_f5c.Q, 16V) @@ -213,9 +213,9 @@ static NETLIST_START(pong_schematics) TTL_7410_NAND(ic_g5a, vblank, 4V, ic_h5a.Q) NET_ALIAS(vsyncQ, ic_g5a.Q) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // move logic - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7400_NAND(ic_e1d, hit_sound, ic_e1c.Q) TTL_7400_NAND(ic_e1c, ic_f1.QC, ic_f1.QD) @@ -245,9 +245,9 @@ static NETLIST_START(pong_schematics) NET_ALIAS(Aa, ic_h4c.Q) NET_ALIAS(Ba, ic_h4b.Q) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // hvid circuit - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7400_NAND(hball_resetQ, Serve, attractQ) @@ -258,9 +258,9 @@ static NETLIST_START(pong_schematics) TTL_7420_NAND(ic_h6b, ic_g6b.Q, ic_h7.RC, ic_g7.QC, ic_g7.QD) NET_ALIAS(hvidQ, ic_h6b.Q) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // vvid circuit - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_9316(ic_b3, hsyncQ, high, vblankQ, high, ic_b2b.Q, a6, b6, c6, d6) TTL_9316(ic_a3, hsyncQ, ic_b3.RC, high, high, ic_b2b.Q, low, low, low, low) @@ -272,9 +272,9 @@ static NETLIST_START(pong_schematics) NET_ALIAS(vpos32, ic_a3.QB) NET_ALIAS(vpos16, ic_a3.QA) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // vball ctrl circuit - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7450_ANDORINVERT(ic_a6a, b1, 256HQ, b2, 256H) TTL_7450_ANDORINVERT(ic_a6b, c1, 256HQ, c2, 256H) @@ -298,64 +298,64 @@ static NETLIST_START(pong_schematics) NET_ALIAS(c6, ic_b4.SC) NET_ALIAS(d6, ic_b4.SD) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // serve monoflop - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7404_INVERT(f4_trig, rstspeed) NETDEV_R(ic_f4_serve_R, RES_K(330)) - NETDEV_C(ic_f4_serve_C, CAP_U(4.7)) - NETDEV_NE555(ic_f4_serve) + NETDEV_C(ic_f4_serve_C, CAP_U(4.7)) + NETDEV_NE555(ic_f4_serve) - NET_C(ic_f4_serve.VCC, V5) - NET_C(ic_f4_serve.GND, GND) - NET_C(ic_f4_serve.RESET, V5) - NET_C(ic_f4_serve_R.1, V5) - NET_C(ic_f4_serve_R.2, ic_f4_serve.THRESH) - NET_C(ic_f4_serve_R.2, ic_f4_serve.DISCH) - NET_C(f4_trig, ic_f4_serve.TRIG) - NET_C(ic_f4_serve_R.2, ic_f4_serve_C.1) - NET_C(GND, ic_f4_serve_C.2) + NET_C(ic_f4_serve.VCC, V5) + NET_C(ic_f4_serve.GND, GND) + NET_C(ic_f4_serve.RESET, V5) + NET_C(ic_f4_serve_R.1, V5) + NET_C(ic_f4_serve_R.2, ic_f4_serve.THRESH) + NET_C(ic_f4_serve_R.2, ic_f4_serve.DISCH) + NET_C(f4_trig, ic_f4_serve.TRIG) + NET_C(ic_f4_serve_R.2, ic_f4_serve_C.1) + NET_C(GND, ic_f4_serve_C.2) - TTL_7427_NOR(ic_e5a, ic_f4_serve.OUT, StopG, runQ) + TTL_7427_NOR(ic_e5a, ic_f4_serve.OUT, StopG, runQ) TTL_7474(ic_b5b_serve, pad1, ic_e5a, ic_e5a, high) NET_ALIAS(Serve, ic_b5b_serve.QQ) NET_ALIAS(ServeQ, ic_b5b_serve.Q) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // score logic - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7474(ic_h3a, 4H, 128H, high, attractQ) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // sound logic - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7474(ic_c2a, vpos256, high, hitQ, high) TTL_74107(ic_f3_topbot, vblank, vvid, vvidQ, ServeQ) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // monoflop with NE555 determines duration of score sound - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- NETDEV_R(ic_g4_R, RES_K(220)) - NETDEV_C(ic_g4_C, CAP_U(1)) - NETDEV_NE555(ic_g4_sc) - NET_ALIAS(SC, ic_g4_sc.OUT) + NETDEV_C(ic_g4_C, CAP_U(1)) + NETDEV_NE555(ic_g4_sc) + NET_ALIAS(SC, ic_g4_sc.OUT) - NET_C(ic_g4_sc.VCC, V5) - NET_C(ic_g4_sc.GND, GND) - NET_C(ic_g4_sc.RESET, V5) - NET_C(ic_g4_R.1, V5) - NET_C(ic_g4_R.2, ic_g4_sc.THRESH) - NET_C(ic_g4_R.2, ic_g4_sc.DISCH) - NET_C(MissQ, ic_g4_sc.TRIG) - NET_C(ic_g4_R.2, ic_g4_C.1) - NET_C(GND, ic_g4_C.2) + NET_C(ic_g4_sc.VCC, V5) + NET_C(ic_g4_sc.GND, GND) + NET_C(ic_g4_sc.RESET, V5) + NET_C(ic_g4_R.1, V5) + NET_C(ic_g4_R.2, ic_g4_sc.THRESH) + NET_C(ic_g4_R.2, ic_g4_sc.DISCH) + NET_C(MissQ, ic_g4_sc.TRIG) + NET_C(ic_g4_R.2, ic_g4_C.1) + NET_C(GND, ic_g4_C.2) - NET_ALIAS(hit_sound_en, ic_c2a.QQ) + NET_ALIAS(hit_sound_en, ic_c2a.QQ) TTL_7400_NAND(hit_sound, hit_sound_en, vpos16) TTL_7400_NAND(score_sound, SC, vpos32) TTL_7400_NAND(topbothitsound, ic_f3_topbot.Q, vpos32) @@ -365,33 +365,33 @@ static NETLIST_START(pong_schematics) NET_ALIAS(sound, ic_c1b.Q) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // paddle1 logic 1 - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- - NETDEV_POT(ic_b9_POT, RES_K(1)) // This is a guess!! - NETDEV_R(ic_b9_RPRE, 470) + NETDEV_POT(ic_b9_POT, RES_K(1)) // This is a guess!! + NETDEV_R(ic_b9_RPRE, 470) - NET_C(ic_b9_POT.1, V5) - NET_C(ic_b9_POT.3, GND) - NET_C(ic_b9_POT.2, ic_b9_RPRE.1) - NET_C(ic_b9_RPRE.2, ic_b9.CONT) + NET_C(ic_b9_POT.1, V5) + NET_C(ic_b9_POT.3, GND) + NET_C(ic_b9_POT.2, ic_b9_RPRE.1) + NET_C(ic_b9_RPRE.2, ic_b9.CONT) - NETDEV_R(ic_b9_R, RES_K(71)) - NETDEV_C(ic_b9_C, CAP_U(.1)) - NETDEV_D(ic_b9_D, 1N914) - NETDEV_NE555(ic_b9) + NETDEV_R(ic_b9_R, RES_K(71)) + NETDEV_C(ic_b9_C, CAP_U(.1)) + NETDEV_D(ic_b9_D, 1N914) + NETDEV_NE555(ic_b9) - NET_C(ic_b9.VCC, V5) - NET_C(ic_b9.GND, GND) - NET_C(ic_b9.RESET, V5) - NET_C(ic_b9_R.1, V5) - NET_C(ic_b9_R.2, ic_b9.THRESH) - NET_C(ic_b9_R.2, ic_b9_D.A) - NET_C(ic_b9_D.K, ic_b9.DISCH) - NET_C(256VQ, ic_b9.TRIG) - NET_C(ic_b9_R.2, ic_b9_C.1) - NET_C(GND, ic_b9_C.2) + NET_C(ic_b9.VCC, V5) + NET_C(ic_b9.GND, GND) + NET_C(ic_b9.RESET, V5) + NET_C(ic_b9_R.1, V5) + NET_C(ic_b9_R.2, ic_b9.THRESH) + NET_C(ic_b9_R.2, ic_b9_D.A) + NET_C(ic_b9_D.K, ic_b9.DISCH) + NET_C(256VQ, ic_b9.TRIG) + NET_C(ic_b9_R.2, ic_b9_C.1) + NET_C(GND, ic_b9_C.2) TTL_7404_INVERT(ic_c9b, ic_b9.OUT) TTL_7400_NAND(ic_b7b, ic_a7b.Q, hsyncQ) @@ -404,33 +404,33 @@ static NETLIST_START(pong_schematics) NET_ALIAS(c1, ic_b8.QC) NET_ALIAS(d1, ic_b8.QD) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // paddle1 logic 2 - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- NETDEV_POT(ic_a9_POT, RES_K(1)) // This is a guess!! - NETDEV_R(ic_a9_RPRE, 470) + NETDEV_R(ic_a9_RPRE, 470) - NET_C(ic_a9_POT.1, V5) - NET_C(ic_a9_POT.3, GND) - NET_C(ic_a9_POT.2, ic_a9_RPRE.1) - NET_C(ic_a9_RPRE.2, ic_a9.CONT) + NET_C(ic_a9_POT.1, V5) + NET_C(ic_a9_POT.3, GND) + NET_C(ic_a9_POT.2, ic_a9_RPRE.1) + NET_C(ic_a9_RPRE.2, ic_a9.CONT) - NETDEV_R(ic_a9_R, RES_K(71)) - NETDEV_C(ic_a9_C, CAP_U(.1)) - NETDEV_D(ic_a9_D, 1N914) - NETDEV_NE555(ic_a9) + NETDEV_R(ic_a9_R, RES_K(71)) + NETDEV_C(ic_a9_C, CAP_U(.1)) + NETDEV_D(ic_a9_D, 1N914) + NETDEV_NE555(ic_a9) - NET_C(ic_a9.VCC, V5) - NET_C(ic_a9.GND, GND) - NET_C(ic_a9.RESET, V5) - NET_C(ic_a9_R.1, V5) - NET_C(ic_a9_R.2, ic_a9.THRESH) - NET_C(ic_a9_R.2, ic_a9_D.A) - NET_C(ic_a9_D.K, ic_a9.DISCH) - NET_C(256VQ, ic_a9.TRIG) - NET_C(ic_a9_R.2, ic_a9_C.1) - NET_C(GND, ic_a9_C.2) + NET_C(ic_a9.VCC, V5) + NET_C(ic_a9.GND, GND) + NET_C(ic_a9.RESET, V5) + NET_C(ic_a9_R.1, V5) + NET_C(ic_a9_R.2, ic_a9.THRESH) + NET_C(ic_a9_R.2, ic_a9_D.A) + NET_C(ic_a9_D.K, ic_a9.DISCH) + NET_C(256VQ, ic_a9.TRIG) + NET_C(ic_a9_R.2, ic_a9_C.1) + NET_C(GND, ic_a9_C.2) TTL_7404_INVERT(ic_c9a, ic_a9.OUT) TTL_7400_NAND(ic_b7c, ic_a7a.Q, hsyncQ) @@ -443,9 +443,9 @@ static NETLIST_START(pong_schematics) NET_ALIAS(c2, ic_a8.QC) NET_ALIAS(d2, ic_a8.QD) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // C5-EN Logic - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7404_INVERT(ic_e3a, 128H) TTL_7427_NOR( ic_e3b, 256H, 64H, ic_e3a.Q) @@ -456,9 +456,9 @@ static NETLIST_START(pong_schematics) TTL_7425_NOR(ic_f2a, ic_g1a.Q, 64V, 128V, ic_d2c.Q) NET_ALIAS(c5-en, ic_f2a.Q) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // Score logic ... - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7402_NOR(ic_f5b, L, Missed) TTL_7490(ic_c7, ic_f5b, SRST, SRST, low, low) @@ -490,9 +490,9 @@ static NETLIST_START(pong_schematics) NET_ALIAS(score2_10, ic_c8b.Q) NET_ALIAS(score2_10Q, ic_c8b.QQ) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // Score display - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_74153(ic_d6a, score1_10Q, score1_4, score2_10Q, score2_4, 32H, 64H, low) TTL_74153(ic_d6b, score1_10Q, score1_8, score2_10Q, score2_8, 32H, 64H, low) @@ -537,9 +537,9 @@ static NETLIST_START(pong_schematics) TTL_7427_NOR(ic_g2b, ic_g3b.Q, vblank, 4V) NET_ALIAS(net, ic_g2b.Q) - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- // video - // ---------------------------------------------------------------------------------------- + // ---------------------------------------------------------------------------------------- TTL_7402_NOR(ic_g1b, hvidQ, vvidQ) TTL_7425_NOR(ic_f2b, ic_g1b.Q, pad1, pad2, net) @@ -550,46 +550,46 @@ static NETLIST_START(pong_schematics) TTL_7404_INVERT(ic_e4f, ic_a4d.Q) NETDEV_R(RV1, RES_K(1)) - NETDEV_R(RV2, RES_K(1.2)) - NETDEV_R(RV3, RES_K(22)) - NET_C(video, RV1.1) - NET_C(score, RV2.1) - NET_C(ic_e4f.Q, RV3.1) - NET_C(RV1.2, RV2.2) - NET_C(RV2.2, RV3.2) + NETDEV_R(RV2, RES_K(1.2)) + NETDEV_R(RV3, RES_K(22)) + NET_C(video, RV1.1) + NET_C(score, RV2.1) + NET_C(ic_e4f.Q, RV3.1) + NET_C(RV1.2, RV2.2) + NET_C(RV2.2, RV3.2) - NET_ALIAS(videomix, RV3.2) + NET_ALIAS(videomix, RV3.2) - NETDEV_SOLVER(Solver) - NETDEV_PARAM(Solver.FREQ, 48000) - NETDEV_ANALOG_CONST(V5, 5) - NETDEV_ANALOG_CONST(V1, 1) - NETDEV_ANALOG_CONST(GND, 0) + NETDEV_SOLVER(Solver) + NETDEV_PARAM(Solver.FREQ, 48000) + NETDEV_ANALOG_CONST(V5, 5) + NETDEV_ANALOG_CONST(V1, 1) + NETDEV_ANALOG_CONST(GND, 0) #if 0 - NETDEV_R(R1, 10) - NETDEV_R(R2, 10) - NETDEV_R(R3, 10) - NET_C(V5,R1.1) - NET_C(R1.2, R2.1) - NET_C(R2.2, R3.1) - NET_C(R3.2, GND) + NETDEV_R(R1, 10) + NETDEV_R(R2, 10) + NETDEV_R(R3, 10) + NET_C(V5,R1.1) + NET_C(R1.2, R2.1) + NET_C(R2.2, R3.1) + NET_C(R3.2, GND) #endif #if 0 - NETDEV_R(R4, 1000) - NETDEV_C(C1, 1e-6) - NET_C(V5,R4.1) - NET_C(R4.2, C1.1) - NET_C(C1.2, GND) - //NETDEV_LOG(log1, C1.1) + NETDEV_R(R4, 1000) + NETDEV_C(C1, 1e-6) + NET_C(V5,R4.1) + NET_C(R4.2, C1.1) + NET_C(C1.2, GND) + //NETDEV_LOG(log1, C1.1) #endif #define tt(_n) \ - NETDEV_R(R ## _n, 1000) \ + NETDEV_R(R ## _n, 1000) \ NETDEV_D(D ## _n) \ - NET_C(V5, R ## _n.1) \ - NET_C(R ## _n.2, D ## _n.A) \ - NET_C(D ## _n.K, GND) + NET_C(V5, R ## _n.1) \ + NET_C(R ## _n.2, D ## _n.A) \ + NET_C(D ## _n.K, GND) /* tt(20) tt(21) @@ -604,180 +604,180 @@ static NETLIST_START(pong_schematics) */ #if 0 - NETDEV_R(R5, 1000) - NETDEV_1N914(D1) - NET_C(V5, R5.1) - NET_C(R5.2, D1.A) - NET_C(D1.K, GND) - //NETDEV_LOG(log1, D1.A) + NETDEV_R(R5, 1000) + NETDEV_1N914(D1) + NET_C(V5, R5.1) + NET_C(R5.2, D1.A) + NET_C(D1.K, GND) + //NETDEV_LOG(log1, D1.A) #endif #if 0 - // astable NAND Multivibrator - NETDEV_R(R1, 1000) - NETDEV_C(C1, 1e-6) - TTL_7400_NAND(n1,R1.1,R1.1) - TTL_7400_NAND(n2,R1.2,R1.2) - NET_C(n1.Q, R1.2) - NET_C(n2.Q, C1.1) - NET_C(C1.2, R1.1) - //NETDEV_LOG(log2, C1.2) - //NETDEV_LOG(log2, n1.Q) - //NETDEV_LOG(log3, n2.Q) + // astable NAND Multivibrator + NETDEV_R(R1, 1000) + NETDEV_C(C1, 1e-6) + TTL_7400_NAND(n1,R1.1,R1.1) + TTL_7400_NAND(n2,R1.2,R1.2) + NET_C(n1.Q, R1.2) + NET_C(n2.Q, C1.1) + NET_C(C1.2, R1.1) + //NETDEV_LOG(log2, C1.2) + //NETDEV_LOG(log2, n1.Q) + //NETDEV_LOG(log3, n2.Q) #endif #if 0 - // astable NE555, 1.13 ms period - NETDEV_R(RA, 5000) - NETDEV_R(RB, 3000) - NETDEV_C(C, 0.15e-6) - NETDEV_NE555(555) + // astable NE555, 1.13 ms period + NETDEV_R(RA, 5000) + NETDEV_R(RB, 3000) + NETDEV_C(C, 0.15e-6) + NETDEV_NE555(555) - NET_C(GND, 555.GND) - NET_C(V5, 555.VCC) + NET_C(GND, 555.GND) + NET_C(V5, 555.VCC) - NET_C(RA.1, 555.VCC) - NET_C(RA.2, 555.DISCH) + NET_C(RA.1, 555.VCC) + NET_C(RA.2, 555.DISCH) - NET_C(RB.1, 555.DISCH) - NET_C(RB.2, 555.TRIG) + NET_C(RB.1, 555.DISCH) + NET_C(RB.2, 555.TRIG) - NET_C(RB.2, 555.THRESH) + NET_C(RB.2, 555.THRESH) - NET_C(555.TRIG, C.1) - NET_C(C.2, GND) - //NETDEV_LOG(log2, C.1) - //NETDEV_LOG(log3, 555.OUT) + NET_C(555.TRIG, C.1) + NET_C(C.2, GND) + //NETDEV_LOG(log2, C.1) + //NETDEV_LOG(log3, 555.OUT) #endif #if 0 - NETDEV_BC238B(Q) - NETDEV_R(RB, 1000) - NETDEV_R(RC, 1000) + NETDEV_BC238B(Q) + NETDEV_R(RB, 1000) + NETDEV_R(RC, 1000) - NET_C(RC.1, V5) - NET_C(RC.2, Q.C) - NET_C(RB.1, 128H) - NET_C(RB.2, Q.B) - NET_C(Q.E, GND) - //NETDEV_LOG(logB, Q.B) - //NETDEV_LOG(logC, Q.C) + NET_C(RC.1, V5) + NET_C(RC.2, Q.C) + NET_C(RB.1, 128H) + NET_C(RB.2, Q.B) + NET_C(Q.E, GND) + //NETDEV_LOG(logB, Q.B) + //NETDEV_LOG(logC, Q.C) #endif #if 0 - NETDEV_VCVS(VV) - NETDEV_R(R1, 1000) - NETDEV_R(R2, 10000) + NETDEV_VCVS(VV) + NETDEV_R(R1, 1000) + NETDEV_R(R2, 10000) - NET_C(V5, R1.1) - NET_C(R1.2, VV.IN) - NET_C(R2.1, VV.OP) - NET_C(R2.2, VV.IN) - NET_C(VV.ON, GND) - NET_C(VV.IP, GND) - NETDEV_LOG(logX, VV.OP) + NET_C(V5, R1.1) + NET_C(R1.2, VV.IN) + NET_C(R2.1, VV.OP) + NET_C(R2.2, VV.IN) + NET_C(VV.ON, GND) + NET_C(VV.IP, GND) + NETDEV_LOG(logX, VV.OP) #endif #if 0 - NETDEV_VCCS(VV) - NETDEV_PARAM(VV.G, 100000) // typical OP-AMP amplification - NETDEV_R(R1, 1000) - NETDEV_R(R2, 1) - NETDEV_R(R3, 10000) + NETDEV_VCCS(VV) + NETDEV_PARAM(VV.G, 100000) // typical OP-AMP amplification + NETDEV_R(R1, 1000) + NETDEV_R(R2, 1) + NETDEV_R(R3, 10000) - NET_C(4V, R1.1) - NET_C(R1.2, VV.IN) - NET_C(R2.1, VV.OP) - NET_C(R3.1, VV.IN) - NET_C(R3.2, VV.OP) - NET_C(R2.2, GND) - NET_C(VV.ON, GND) - NET_C(VV.IP, GND) - //NETDEV_LOG(logX, VV.OP) - //NETDEV_LOG(logY, 4V) + NET_C(4V, R1.1) + NET_C(R1.2, VV.IN) + NET_C(R2.1, VV.OP) + NET_C(R3.1, VV.IN) + NET_C(R3.2, VV.OP) + NET_C(R2.2, GND) + NET_C(VV.ON, GND) + NET_C(VV.IP, GND) + //NETDEV_LOG(logX, VV.OP) + //NETDEV_LOG(logY, 4V) #endif #if 0 - NETDEV_VCVS(VV) - NETDEV_PARAM(VV.G, 100000) // typical OP-AMP amplification - NETDEV_PARAM(VV.RO, 50) // typical OP-AMP amplification - NETDEV_R(R1, 1000) - NETDEV_R(R3, 10000) // ==> 10x amplification (inverting) + NETDEV_VCVS(VV) + NETDEV_PARAM(VV.G, 100000) // typical OP-AMP amplification + NETDEV_PARAM(VV.RO, 50) // typical OP-AMP amplification + NETDEV_R(R1, 1000) + NETDEV_R(R3, 10000) // ==> 10x amplification (inverting) - NET_C(4V, R1.1) - NET_C(R1.2, VV.IN) - NET_C(R3.1, VV.IN) - NET_C(R3.2, VV.OP) - NET_C(VV.ON, GND) - NET_C(VV.IP, GND) - NETDEV_LOG(logX, VV.OP) - NETDEV_LOG(logY, 4V) + NET_C(4V, R1.1) + NET_C(R1.2, VV.IN) + NET_C(R3.1, VV.IN) + NET_C(R3.2, VV.OP) + NET_C(VV.ON, GND) + NET_C(VV.IP, GND) + NETDEV_LOG(logX, VV.OP) + NETDEV_LOG(logY, 4V) #endif #if 0 - // Impedance converter with resistor - NETDEV_VCVS(VV) - NETDEV_PARAM(VV.G, 100000) // typical OP-AMP amplification - NETDEV_PARAM(VV.RO, 50) // typical OP-AMP amplification - NETDEV_R(R3, 10000) + // Impedance converter with resistor + NETDEV_VCVS(VV) + NETDEV_PARAM(VV.G, 100000) // typical OP-AMP amplification + NETDEV_PARAM(VV.RO, 50) // typical OP-AMP amplification + NETDEV_R(R3, 10000) - NET_C(4V, VV.IP) - NET_C(R3.1, VV.IN) - NET_C(R3.2, VV.OP) - NET_C(VV.ON, GND) - NETDEV_LOG(logX, VV.OP) - NETDEV_LOG(logY, 4V) + NET_C(4V, VV.IP) + NET_C(R3.1, VV.IN) + NET_C(R3.2, VV.OP) + NET_C(VV.ON, GND) + NETDEV_LOG(logX, VV.OP) + NETDEV_LOG(logY, 4V) #endif #if 0 - // Impedance converter without resistor - NETDEV_VCVS(VV) - NETDEV_PARAM(VV.G, 100000) // typical OP-AMP amplification - NETDEV_PARAM(VV.RO, 50) // typical OP-AMP amplification + // Impedance converter without resistor + NETDEV_VCVS(VV) + NETDEV_PARAM(VV.G, 100000) // typical OP-AMP amplification + NETDEV_PARAM(VV.RO, 50) // typical OP-AMP amplification - NET_C(4V, VV.IP) - NET_C(VV.IN, VV.OP) - NET_C(VV.ON, GND) - NETDEV_LOG(logX, VV.OP) - NETDEV_LOG(logY, 4V) + NET_C(4V, VV.IP) + NET_C(VV.IN, VV.OP) + NET_C(VV.ON, GND) + NETDEV_LOG(logX, VV.OP) + NETDEV_LOG(logY, 4V) #endif #if 0 - /* Impedance converter current source opamp model from - * - * http://www.ecircuitcenter.com/Circuits/opmodel1/opmodel1.htm - * - * Bandwidth 10Mhz - * - */ - NETDEV_VCCS(G1) - NETDEV_PARAM(G1.G, 100) // typical OP-AMP amplification 100 * 1000 = 100000 - NETDEV_R(RP1, 1000) - NETDEV_C(CP1, 1.59e-6) // <== change to 1.59e-3 for 10Khz bandwidth - NETDEV_VCVS(EBUF) - NETDEV_PARAM(EBUF.RO, 50) - NETDEV_PARAM(EBUF.G, 1) + /* Impedance converter current source opamp model from + * + * http://www.ecircuitcenter.com/Circuits/opmodel1/opmodel1.htm + * + * Bandwidth 10Mhz + * + */ + NETDEV_VCCS(G1) + NETDEV_PARAM(G1.G, 100) // typical OP-AMP amplification 100 * 1000 = 100000 + NETDEV_R(RP1, 1000) + NETDEV_C(CP1, 1.59e-6) // <== change to 1.59e-3 for 10Khz bandwidth + NETDEV_VCVS(EBUF) + NETDEV_PARAM(EBUF.RO, 50) + NETDEV_PARAM(EBUF.G, 1) - NET_C(G1.IP, 4V) - NET_C(G1.IN, EBUF.OP) - NET_C(EBUF.ON, GND) + NET_C(G1.IP, 4V) + NET_C(G1.IN, EBUF.OP) + NET_C(EBUF.ON, GND) - NET_C(G1.ON, GND) - NET_C(RP1.2, GND) - NET_C(CP1.2, GND) - NET_C(EBUF.IN, GND) + NET_C(G1.ON, GND) + NET_C(RP1.2, GND) + NET_C(CP1.2, GND) + NET_C(EBUF.IN, GND) - NET_C(RP1.1, G1.OP) - NET_C(CP1.1, RP1.1) - NET_C(EBUF.IP, RP1.1) + NET_C(RP1.1, G1.OP) + NET_C(CP1.1, RP1.1) + NET_C(EBUF.IP, RP1.1) - //NETDEV_LOG(logX, EBUF.OP) - //NETDEV_LOG(logY, 4V) + //NETDEV_LOG(logX, EBUF.OP) + //NETDEV_LOG(logY, 4V) #endif @@ -794,7 +794,7 @@ public: m_dac(*this, "dac"), /* just to have a sound device */ m_srst(*this, "maincpu", "SRST"), m_p_P0(*this, "maincpu", "ic_b9_POT.DIAL"), - m_p_P1(*this, "maincpu", "ic_a9_POT.DIAL"), + m_p_P1(*this, "maincpu", "ic_a9_POT.DIAL"), m_sw1a(*this, "maincpu", "sw1a.POS"), m_sw1b(*this, "maincpu", "sw1b.POS"), m_p_R0(*this, "maincpu", "ic_a9_R.R"), @@ -809,8 +809,8 @@ public: // sub devices netlist_mame_device::required_output m_srst; - netlist_mame_device::required_param m_p_P0; - netlist_mame_device::required_param m_p_P1; + netlist_mame_device::required_param m_p_P0; + netlist_mame_device::required_param m_p_P1; netlist_mame_device::required_param m_sw1a; netlist_mame_device::required_param m_sw1b; netlist_mame_device::required_param m_p_R0; @@ -847,19 +847,19 @@ private: static NETLIST_START(pong) - //NETLIST_INCLUDE(pong_schematics) - NETLIST_MEMREGION("maincpu") + //NETLIST_INCLUDE(pong_schematics) + NETLIST_MEMREGION("maincpu") - NETDEV_ANALOG_CALLBACK(sound_cb, sound, pong_state, sound_cb, "") - NETDEV_ANALOG_CALLBACK(video_cb, videomix, pong_state, video_cb, "") + NETDEV_ANALOG_CALLBACK(sound_cb, sound, pong_state, sound_cb, "") + NETDEV_ANALOG_CALLBACK(video_cb, videomix, pong_state, video_cb, "") NETLIST_END static NETLIST_START(pong_fast) - NETLIST_INCLUDE(pong_schematics) + NETLIST_INCLUDE(pong_schematics) - NETDEV_ANALOG_CALLBACK(sound_cb, sound, pong_state, sound_cb, "") - NETDEV_ANALOG_CALLBACK(video_cb, videomix, pong_state, video_cb, "") + NETDEV_ANALOG_CALLBACK(sound_cb, sound, pong_state, sound_cb, "") + NETDEV_ANALOG_CALLBACK(video_cb, videomix, pong_state, video_cb, "") NETLIST_END @@ -891,11 +891,11 @@ INPUT_CHANGED_MEMBER(pong_state::input_changed) double fac = (double) newval / (double) 256; fac = (exp(fac) - 1.0) / (exp(1.0) -1.0) ; - switch (numpad) - { - case IC_PADDLE1: m_p_P0->setTo(fac); break; - case IC_PADDLE2: m_p_P1->setTo(fac); break; - } + switch (numpad) + { + case IC_PADDLE1: m_p_P0->setTo(fac); break; + case IC_PADDLE2: m_p_P1->setTo(fac); break; + } break; } case IC_SWITCH: @@ -908,11 +908,11 @@ INPUT_CHANGED_MEMBER(pong_state::input_changed) case IC_VR1: case IC_VR2: pad = (double) newval / (double) 100 * RES_K(50) + RES_K(56); - switch (numpad) - { - case IC_VR1: m_p_R0->setTo(pad); break; - case IC_VR2: m_p_R1->setTo(pad); break; - } + switch (numpad) + { + case IC_VR1: m_p_R0->setTo(pad); break; + case IC_VR2: m_p_R1->setTo(pad); break; + } break; } diff --git a/src/mame/drivers/qdrmfgp.c b/src/mame/drivers/qdrmfgp.c index c1adbbb4af..97f40f4a66 100644 --- a/src/mame/drivers/qdrmfgp.c +++ b/src/mame/drivers/qdrmfgp.c @@ -30,7 +30,7 @@ GP1 HDD data contents: #include "includes/qdrmfgp.h" -#define IDE_HACK 1 +#define IDE_HACK 1 /************************************* diff --git a/src/mame/drivers/rungun.c b/src/mame/drivers/rungun.c index 9b39a7a3b0..1ca876447e 100644 --- a/src/mame/drivers/rungun.c +++ b/src/mame/drivers/rungun.c @@ -201,9 +201,9 @@ WRITE8_MEMBER(rungun_state::sound_status_w) WRITE8_MEMBER(rungun_state::sound_ctrl_w) { /* - .... xxxx - Z80 ROM bank - ...x .... - NMI enable/acknowledge - xx.. .... - BLT2/1 (?) + .... xxxx - Z80 ROM bank + ...x .... - NMI enable/acknowledge + xx.. .... - BLT2/1 (?) */ membank("bank2")->set_entry(data & 0x07); diff --git a/src/mame/drivers/sangho.c b/src/mame/drivers/sangho.c index 3ce73de6d7..201813e9c4 100644 --- a/src/mame/drivers/sangho.c +++ b/src/mame/drivers/sangho.c @@ -81,10 +81,10 @@ public: }; /* - slot 0 selects RAM - slot 1 selects ? - slot 2 selects code ROMs - slot 3 selects data ROMs + slot 0 selects RAM + slot 1 selects ? + slot 2 selects code ROMs + slot 3 selects data ROMs */ void sangho_state::pzlestar_map_banks() { diff --git a/src/mame/drivers/seta.c b/src/mame/drivers/seta.c index 648a1ea628..d3f594b18f 100644 --- a/src/mame/drivers/seta.c +++ b/src/mame/drivers/seta.c @@ -5802,7 +5802,7 @@ INPUT_PORTS_END static INPUT_PORTS_START( thunderlbl ) PORT_INCLUDE(thunderl) - + PORT_MODIFY("DSW") PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("SW1:2") PORT_DIPSETTING( 0x0200, DEF_STR( Off ) ) @@ -8758,7 +8758,7 @@ static MACHINE_CONFIG_DERIVED( thunderlbl, thunderl ) /* the sound hardware / program is ripped from Tetris (S16B) */ MCFG_DEVICE_REMOVE("x1snd") - + MCFG_YM2151_ADD("ymsnd", 16000000/2) MCFG_SOUND_ROUTE(0, "lspeaker", 1.0) MCFG_SOUND_ROUTE(1, "rspeaker", 1.0) diff --git a/src/mame/drivers/superchs.c b/src/mame/drivers/superchs.c index 1dbb14e639..2f76942989 100644 --- a/src/mame/drivers/superchs.c +++ b/src/mame/drivers/superchs.c @@ -530,10 +530,10 @@ ROM_START( superchsp ) ROM_LOAD16_BYTE( "ic127 ae27.bin", 0x00000, 0x40000, CRC(8c8cd2a1) SHA1(178ab2df0ea7371ce275d38051643ea19ba88047) ) ROM_REGION( 0x200000, "gfx1", 0 ) /* SCR 16x16 tiles */ - ROM_LOAD32_BYTE( "0scn.ic9", 0x00000, 0x080000, CRC(d54e80ec) SHA1(83460cf97b0da8523486ede5bd504710c790b1a6) ) - ROM_LOAD32_BYTE( "8scn.ic8", 0x00002, 0x080000, CRC(b3da122d) SHA1(1e4198b2d5ce2144a7ca01f418aca33f799dcad2) ) - ROM_LOAD32_BYTE( "16scn.ic12", 0x00001, 0x080000, CRC(dd26932c) SHA1(31bcc4e0195a6d966829976b89e81e6eb7dde8b6) ) - ROM_LOAD32_BYTE( "24scn.ic13", 0x00003, 0x080000, CRC(4f560680) SHA1(6398013b8fa5aebc905bf31918e990dd7f5d9490) ) + ROM_LOAD32_BYTE( "0scn.ic9", 0x00000, 0x080000, CRC(d54e80ec) SHA1(83460cf97b0da8523486ede5bd504710c790b1a6) ) + ROM_LOAD32_BYTE( "8scn.ic8", 0x00002, 0x080000, CRC(b3da122d) SHA1(1e4198b2d5ce2144a7ca01f418aca33f799dcad2) ) + ROM_LOAD32_BYTE( "16scn.ic12", 0x00001, 0x080000, CRC(dd26932c) SHA1(31bcc4e0195a6d966829976b89e81e6eb7dde8b6) ) + ROM_LOAD32_BYTE( "24scn.ic13", 0x00003, 0x080000, CRC(4f560680) SHA1(6398013b8fa5aebc905bf31918e990dd7f5d9490) ) ROM_REGION( 0x800000, "gfx2", 0 ) ROMX_LOAD( "0lobj.ic14", 0x000003, 0x80000, CRC(972d0866) SHA1(7787312ba99d971eee30d50ddff12629e3bdc8b9) , ROM_SKIP(7) ) diff --git a/src/mame/drivers/toaplan2.c b/src/mame/drivers/toaplan2.c index 413c623982..7b1960137d 100644 --- a/src/mame/drivers/toaplan2.c +++ b/src/mame/drivers/toaplan2.c @@ -37,7 +37,7 @@ Supported games: batsuguna TP-030 Toaplan Batsugun (older) batsugunsp TP-030 Toaplan Batsugun (Special Version) pwrkick ?????? Sunwise Power Kick - othldrby ?????? Sunwise Othello Derby + othldrby ?????? Sunwise Othello Derby snowbro2 ?????? Hanafram Snow Bros. 2 - With New Elves * This version of Whoopee!! is on a board labeled TP-020 @@ -5348,4 +5348,3 @@ GAME( 1999, bbakraid, 0, bbakraid, bbakraid, toaplan2_state, bbakraid, GAME( 1999, bbakraidj, bbakraid, bbakraid, bbakraid, toaplan2_state, bbakraid, ROT270, "Eighting", "Battle Bakraid - Unlimited Version (Japan) (Tue Jun 8 1999)", GAME_SUPPORTS_SAVE ) // older revision of the code GAME( 1999, bbakraidja, bbakraid, bbakraid, bbakraid, toaplan2_state, bbakraid, ROT270, "Eighting", "Battle Bakraid (Japan) (Wed Apr 7 1999)", GAME_SUPPORTS_SAVE ) - diff --git a/src/mame/drivers/twinkle.c b/src/mame/drivers/twinkle.c index 0b5aa3e74d..be4e87d7c9 100644 --- a/src/mame/drivers/twinkle.c +++ b/src/mame/drivers/twinkle.c @@ -1086,7 +1086,7 @@ ROM_START( bmiidx4 ) ROM_LOAD( "a03", 0x000000, 0x000100, BAD_DUMP CRC(8860cfb6) SHA1(85a5b27f24d4baa7960e692b91c0cf3dc5388e72) ) DISK_REGION( "scsi:cdrom" ) - DISK_IMAGE_READONLY( "a03jaa01", 0, SHA1(f54fc778c2187ccd950402a159babef956b71492 ) ) + DISK_IMAGE_READONLY( "a03jaa01", 0, SHA1(f54fc778c2187ccd950402a159babef956b71492 ) ) DISK_REGION( "cdrom1" ) // video CD DISK_IMAGE_READONLY( "a03jaa02", 0, SHA1(d6f01d666e8de285a02215f7ef987073e2b25019) ) diff --git a/src/mame/drivers/ultrsprt.c b/src/mame/drivers/ultrsprt.c index 90d9d2bec8..9c454df368 100644 --- a/src/mame/drivers/ultrsprt.c +++ b/src/mame/drivers/ultrsprt.c @@ -1,7 +1,7 @@ /* - Konami Ultra Sports hardware + Konami Ultra Sports hardware - Driver by Ville Linde + Driver by Ville Linde */ #include "emu.h" @@ -22,8 +22,8 @@ public: m_k056800(*this, "k056800"), m_workram(*this, "workram") { } - static const UINT32 VRAM_PAGES = 2; - static const UINT32 VRAM_PAGE_BYTES = 512 * 1024; + static const UINT32 VRAM_PAGES = 2; + static const UINT32 VRAM_PAGE_BYTES = 512 * 1024; required_device m_maincpu; required_device m_audiocpu; @@ -109,14 +109,14 @@ WRITE32_MEMBER(ultrsprt_state::eeprom_w) if (ACCESSING_BITS_24_31) { /* - .... ...x - EEPROM DI - .... ..x. - EEPROM CLK - .... .x.. - EEPROM /CS - .... x... - VRAM page (CPU access) - ...x .... - Coin counter - ..x. .... - Watchdog /Reset - .x.. .... - Trackball /Reset - x... .... - Sound CPU /Reset + .... ...x - EEPROM DI + .... ..x. - EEPROM CLK + .... .x.. - EEPROM /CS + .... x... - VRAM page (CPU access) + ...x .... - Coin counter + ..x. .... - Watchdog /Reset + .x.. .... - Trackball /Reset + x... .... - Sound CPU /Reset */ ioport("EEPROMOUT")->write(data, 0xffffffff); diff --git a/src/mame/drivers/vegas.c b/src/mame/drivers/vegas.c index 0ca2542ba0..de7daf2c03 100644 --- a/src/mame/drivers/vegas.c +++ b/src/mame/drivers/vegas.c @@ -1610,7 +1610,7 @@ void vegas_state::remap_dynamic_addresses() /* unmap everything we know about */ for (addr = 0; addr < m_dynamic_count; addr++) m_maincpu->space(AS_PROGRAM).unmap_readwrite(dynamic[addr].start, dynamic[addr].end); - + for (l_addr = 0; l_addr < m_legacy_dynamic_count; l_addr++) m_maincpu->space(AS_PROGRAM).unmap_readwrite(l_dynamic[l_addr].start, l_dynamic[l_addr].end); @@ -1741,7 +1741,7 @@ void vegas_state::remap_dynamic_addresses() if (!dynamic[addr].write.isnull()) space.install_write_handler(dynamic[addr].start, dynamic[addr].end, 0, 0, dynamic[addr].write); } - + for (l_addr = 0; l_addr < m_legacy_dynamic_count; l_addr++) { if (LOG_DYNAMIC) logerror(" installing: %08X-%08X %s,%s\n", l_dynamic[l_addr].start, l_dynamic[l_addr].end, l_dynamic[l_addr].rdname, l_dynamic[l_addr].wrname); diff --git a/src/mame/drivers/zr107.c b/src/mame/drivers/zr107.c index 10b780aa6a..d033f37c09 100644 --- a/src/mame/drivers/zr107.c +++ b/src/mame/drivers/zr107.c @@ -207,7 +207,7 @@ public: int m_ccu_vctl; UINT8 m_sound_ctrl; UINT8 m_sound_intck; - + DECLARE_WRITE32_MEMBER(paletteram32_w); DECLARE_READ8_MEMBER(sysreg_r); DECLARE_WRITE8_MEMBER(sysreg_w); @@ -841,12 +841,12 @@ static MACHINE_CONFIG_START( jetwave, zr107_state ) MCFG_K001604_ADD("k001604", jetwave_k001604_intf) MCFG_K056800_ADD("k056800", XTAL_18_432MHz) - MCFG_K056800_INT_HANDLER(INPUTLINE("audiocpu", M68K_IRQ_1)) + MCFG_K056800_INT_HANDLER(INPUTLINE("audiocpu", M68K_IRQ_1)) MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker") MCFG_K054539_ADD("k054539_1", XTAL_18_432MHz, k054539_config) - MCFG_K054539_TIMER_HANDLER(WRITELINE(zr107_state, k054539_irq_gen)) + MCFG_K054539_TIMER_HANDLER(WRITELINE(zr107_state, k054539_irq_gen)) MCFG_SOUND_ROUTE(0, "lspeaker", 0.75) MCFG_SOUND_ROUTE(1, "rspeaker", 0.75) diff --git a/src/mame/includes/40love.h b/src/mame/includes/40love.h index 3a424da77a..aef45fc2ce 100644 --- a/src/mame/includes/40love.h +++ b/src/mame/includes/40love.h @@ -25,7 +25,7 @@ public: required_shared_ptr m_colorram; required_shared_ptr m_spriteram2; optional_shared_ptr m_mcu_ram; - + /* video-related */ bitmap_ind16 *m_tmp_bitmap1; bitmap_ind16 *m_tmp_bitmap2; @@ -114,12 +114,12 @@ public: void fortyl_plot_pix( int offset ); void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void draw_pixram( bitmap_ind16 &bitmap, const rectangle &cliprect ); - + enum { TIMER_NMI_CALLBACK }; protected: - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); }; diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h index 67ccaa4e4a..5f555851be 100644 --- a/src/mame/includes/astrocde.h +++ b/src/mame/includes/astrocde.h @@ -43,7 +43,7 @@ public: optional_device m_astrocade_sound1; optional_shared_ptr m_videoram; optional_shared_ptr m_protected_ram; - + UINT8 m_video_config; UINT8 m_sparkle[4]; char m_totalword[256]; @@ -152,11 +152,11 @@ public: void execute_blit(address_space &space); void init_sparklestar(); virtual void machine_start(); - + /*----------- defined in audio/wow.c -----------*/ DECLARE_READ8_MEMBER( wow_speech_r ); CUSTOM_INPUT_MEMBER( wow_speech_status_r ); - + /*----------- defined in audio/gorf.c -----------*/ DECLARE_READ8_MEMBER( gorf_speech_r ); CUSTOM_INPUT_MEMBER( gorf_speech_status_r ); diff --git a/src/mame/includes/bfm_sc45.h b/src/mame/includes/bfm_sc45.h index 81fc11f6ec..8d64d7c96a 100644 --- a/src/mame/includes/bfm_sc45.h +++ b/src/mame/includes/bfm_sc45.h @@ -103,7 +103,7 @@ public: DECLARE_WRITE16_MEMBER(sc4_mem_w); DECLARE_READ16_MEMBER(sc4_cs1_r); - + DECLARE_WRITE_LINE_MEMBER(bfm_sc4_duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(bfm_sc4_duart_txa); DECLARE_READ8_MEMBER(bfm_sc4_duart_input_r); diff --git a/src/mame/includes/bfm_sc5.h b/src/mame/includes/bfm_sc5.h index 5b918f6a1d..369982df7c 100644 --- a/src/mame/includes/bfm_sc5.h +++ b/src/mame/includes/bfm_sc5.h @@ -24,7 +24,7 @@ public: DECLARE_READ8_MEMBER( sc5_mux1_r ); DECLARE_WRITE8_MEMBER( sc5_mux1_w ); DECLARE_WRITE8_MEMBER( sc5_mux2_w ); - + DECLARE_WRITE_LINE_MEMBER(bfm_sc5_duart_irq_handler); DECLARE_WRITE_LINE_MEMBER(bfm_sc5_duart_txa); DECLARE_READ8_MEMBER(bfm_sc5_duart_input_r); diff --git a/src/mame/includes/harddriv.h b/src/mame/includes/harddriv.h index 07b95bf123..5a468a02ba 100644 --- a/src/mame/includes/harddriv.h +++ b/src/mame/includes/harddriv.h @@ -292,11 +292,11 @@ public: required_device m_duart; optional_device m_asic65; DECLARE_WRITE_LINE_MEMBER(harddriv_duart_irq_handler); - + /*----------- defined in audio/harddriv.c -----------*/ void hdsnd_init(); - + /*----------- defined in machine/harddriv.c -----------*/ /* Driver/Multisync board */ @@ -329,7 +329,7 @@ public: DECLARE_WRITE16_MEMBER( hdgsp_io_w ); DECLARE_WRITE16_MEMBER( hdgsp_protection_w ); - + /* ADSP board */ DECLARE_READ16_MEMBER( hd68k_adsp_program_r ); DECLARE_WRITE16_MEMBER( hd68k_adsp_program_w ); @@ -346,11 +346,11 @@ public: DECLARE_READ16_MEMBER( hdadsp_special_r ); DECLARE_WRITE16_MEMBER( hdadsp_special_w ); - + /* DS III/IV board */ void update_ds3_irq(); void update_ds3_sirq(); - + DECLARE_WRITE16_MEMBER( hd68k_ds3_control_w ); DECLARE_READ16_MEMBER( hd68k_ds3_girq_state_r ); @@ -377,7 +377,7 @@ public: DECLARE_WRITE16_MEMBER( hdds3_sdsp_control_w ); DECLARE_READ16_MEMBER( hdds3_xdsp_control_r ); DECLARE_WRITE16_MEMBER( hdds3_xdsp_control_w ); - + /* DSK board */ DECLARE_WRITE16_MEMBER( hd68k_dsk_control_w ); DECLARE_READ16_MEMBER( hd68k_dsk_ram_r ); @@ -418,7 +418,7 @@ public: /* ADSP optimizations */ DECLARE_READ16_MEMBER( hdadsp_speedup_r ); DECLARE_READ16_MEMBER( hdds3_speedup_r ); - + /*----------- defined in video/harddriv.c -----------*/ DECLARE_READ16_MEMBER( hdgsp_control_lo_r ); DECLARE_WRITE16_MEMBER( hdgsp_control_lo_w ); diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h index f91f2fff21..c0219cc007 100644 --- a/src/mame/includes/maygay1b.h +++ b/src/mame/includes/maygay1b.h @@ -52,7 +52,7 @@ public: optional_device m_vfd; optional_device m_msm6376; required_device m_duart68681; - + UINT8 m_lamppos; int m_alpha_clock; int m_RAMEN; diff --git a/src/mame/includes/namcos1.h b/src/mame/includes/namcos1.h index 691b5d674b..f75299a087 100644 --- a/src/mame/includes/namcos1.h +++ b/src/mame/includes/namcos1.h @@ -113,7 +113,7 @@ public: virtual void video_start(); UINT32 screen_update_namcos1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void screen_eof_namcos1(screen_device &screen, bool state); - + private: inline void bg_get_info(tile_data &tileinfo,int tile_index,UINT8 *info_vram); diff --git a/src/mame/includes/pgm.h b/src/mame/includes/pgm.h index 04e45ef33d..1ac2b4d2f8 100644 --- a/src/mame/includes/pgm.h +++ b/src/mame/includes/pgm.h @@ -80,7 +80,7 @@ public: DECLARE_WRITE8_MEMBER(z80_l3_w); DECLARE_WRITE16_MEMBER(pgm_tx_videoram_w); DECLARE_WRITE16_MEMBER(pgm_bg_videoram_w); - + DECLARE_DRIVER_INIT(pgm); TILE_GET_INFO_MEMBER(get_pgm_tx_tilemap_tile_info); diff --git a/src/mame/includes/plygonet.h b/src/mame/includes/plygonet.h index 638d8c9c21..06cde56513 100644 --- a/src/mame/includes/plygonet.h +++ b/src/mame/includes/plygonet.h @@ -46,9 +46,9 @@ public: tilemap_t *m_roz_tilemap; UINT16 m_ttl_vram[0x800]; UINT16 m_roz_vram[0x800]; - + /* sound */ - UINT8 m_sound_ctrl; + UINT8 m_sound_ctrl; UINT8 m_sound_intck; /* memory buffers */ diff --git a/src/mame/includes/rungun.h b/src/mame/includes/rungun.h index f7af04ffa4..802f3a6ee3 100644 --- a/src/mame/includes/rungun.h +++ b/src/mame/includes/rungun.h @@ -46,9 +46,9 @@ public: int m_sprite_colorbase; /* sound */ - UINT8 m_sound_ctrl; - UINT8 m_sound_status; - UINT8 m_sound_nmi_clk; + UINT8 m_sound_ctrl; + UINT8 m_sound_status; + UINT8 m_sound_nmi_clk; DECLARE_READ16_MEMBER(rng_sysregs_r); DECLARE_WRITE16_MEMBER(rng_sysregs_w); diff --git a/src/mame/includes/stv.h b/src/mame/includes/stv.h index 83d43339aa..5f4996c96a 100644 --- a/src/mame/includes/stv.h +++ b/src/mame/includes/stv.h @@ -739,7 +739,7 @@ public: DECLARE_READ16_MEMBER( adsp_control_r ); DECLARE_WRITE16_MEMBER( adsp_control_w ); DECLARE_WRITE32_MEMBER(batmanfr_sound_comms_w); - + // protection specific variables and functions (see machine/stvprot.c) UINT32 m_abus_protenable; UINT32 m_abus_prot_addr; @@ -751,21 +751,21 @@ public: UINT8 m_char_offset; //helper to jump the decoding of the NULL chars. UINT32 (*m_prot_readback)(address_space&,int,UINT32); - + DECLARE_READ32_MEMBER( common_prot_r ); DECLARE_WRITE32_MEMBER( common_prot_w ); - + void install_common_protection(); - + void install_twcup98_protection(); void install_sss_protection(); void install_astrass_protection(); void install_rsgun_protection(); void install_elandore_protection(); void install_ffreveng_protection(); - - void stv_register_protection_savestates(); - + + void stv_register_protection_savestates(); + // Decathlete specific variables and functions (see machine/decathlt.c) UINT32 m_decathlt_protregs[4]; UINT32 m_decathlt_lastcount; @@ -774,7 +774,7 @@ public: UINT32 m_decathlt_prot_uploadoffset; UINT16 m_decathlt_prottable1[24]; UINT16 m_decathlt_prottable2[128]; - + DECLARE_READ32_MEMBER( decathlt_prot_r ); DECLARE_WRITE32_MEMBER( decathlt_prot1_w ); DECLARE_WRITE32_MEMBER( decathlt_prot2_w ); diff --git a/src/mame/includes/vsnes.h b/src/mame/includes/vsnes.h index 822c4143e4..4c428400c9 100644 --- a/src/mame/includes/vsnes.h +++ b/src/mame/includes/vsnes.h @@ -10,8 +10,8 @@ public: m_subcpu(*this, "sub"), m_nesapu1(*this, "nesapu1"), m_nesapu2(*this, "nesapu2"), - m_ppu1(*this, "ppu1"), - m_ppu2(*this, "ppu2"), + m_ppu1(*this, "ppu1"), + m_ppu2(*this, "ppu2"), m_work_ram(*this, "work_ram"), m_work_ram_1(*this, "work_ram_1") { } diff --git a/src/mame/machine/asic65.c b/src/mame/machine/asic65.c index 088fd32605..0aaa1c86b6 100644 --- a/src/mame/machine/asic65.c +++ b/src/mame/machine/asic65.c @@ -555,7 +555,7 @@ MACHINE_CONFIG_FRAGMENT( asic65 ) MCFG_CPU_ADD("asic65cpu", TMS32010, 20000000) MCFG_CPU_PROGRAM_MAP(asic65_program_map) MCFG_CPU_IO_MAP(asic65_io_map) -MACHINE_CONFIG_END +MACHINE_CONFIG_END //------------------------------------------------- // machine_config_additions - device-specific diff --git a/src/mame/machine/asic65.h b/src/mame/machine/asic65.h index f1604df2e7..2440fe82c3 100644 --- a/src/mame/machine/asic65.h +++ b/src/mame/machine/asic65.h @@ -5,10 +5,10 @@ * Implementation of ASIC65 * *************************************/ - - #include "cpu/tms32010/tms32010.h" - - enum { + + #include "cpu/tms32010/tms32010.h" + + enum { ASIC65_STANDARD, ASIC65_STEELTAL, ASIC65_GUARDIANS, @@ -19,7 +19,7 @@ class asic65_device : public device_t { public: asic65_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // (static) configuration helpers static void set_type(device_t &device, int type) { downcast(device).m_asic65_type = type; } @@ -27,14 +27,14 @@ public: DECLARE_WRITE16_MEMBER( data_w ); DECLARE_READ16_MEMBER( read ); DECLARE_READ16_MEMBER( io_r ); - + TIMER_CALLBACK_MEMBER( m68k_asic65_deferred_w ); WRITE16_MEMBER( m68k_w ); READ16_MEMBER( m68k_r ); WRITE16_MEMBER( stat_w ); READ16_MEMBER( stat_r ); READ16_MEMBER( get_bio ); - + enum { TIMER_M68K_ASIC65_DEFERRED_W diff --git a/src/mame/machine/harddriv.c b/src/mame/machine/harddriv.c index 7755ec29d3..3d3127fa1d 100644 --- a/src/mame/machine/harddriv.c +++ b/src/mame/machine/harddriv.c @@ -322,7 +322,7 @@ WRITE16_MEMBER( harddriv_state::hd68k_adc_control_w ) { static const char *const adc8names[] = { "8BADC0", "8BADC1", "8BADC2", "8BADC3", "8BADC4", "8BADC5", "8BADC6", "8BADC7" }; static const char *const adc12names[] = { "12BADC0", "12BADC1", "12BADC2", "12BADC3" }; - + COMBINE_DATA(&m_adc_control); /* handle a write to the 8-bit ADC address select */ diff --git a/src/mame/machine/igs025.c b/src/mame/machine/igs025.c index b1213791c9..86eaa07c08 100644 --- a/src/mame/machine/igs025.c +++ b/src/mame/machine/igs025.c @@ -273,26 +273,26 @@ READ16_MEMBER(igs025_device::killbld_igs025_prot_r) case 0x05: { - switch (m_kb_ptr) - { - case 1: - return 0x3f00 | ((m_kb_game_id >> 0) & 0xff); + switch (m_kb_ptr) + { + case 1: + return 0x3f00 | ((m_kb_game_id >> 0) & 0xff); - case 2: - return 0x3f00 | ((m_kb_game_id >> 8) & 0xff); + case 2: + return 0x3f00 | ((m_kb_game_id >> 8) & 0xff); - case 3: - return 0x3f00 | ((m_kb_game_id >> 16) & 0xff); + case 3: + return 0x3f00 | ((m_kb_game_id >> 16) & 0xff); - case 4: - return 0x3f00 | ((m_kb_game_id >> 24) & 0xff); + case 4: + return 0x3f00 | ((m_kb_game_id >> 24) & 0xff); - default: // >= 5 - return 0x3f00 | BITSWAP8(m_kb_prot_hold, 5, 2, 9, 7, 10, 13, 12, 15); - } + default: // >= 5 + return 0x3f00 | BITSWAP8(m_kb_prot_hold, 5, 2, 9, 7, 10, 13, 12, 15); + } - return 0x3f00; - //return 0; + return 0x3f00; + //return 0; } case 0x40: diff --git a/src/mame/machine/k573npu.c b/src/mame/machine/k573npu.c index 9ef65a982f..62c14415b2 100644 --- a/src/mame/machine/k573npu.c +++ b/src/mame/machine/k573npu.c @@ -48,7 +48,7 @@ Notes: (all IC's shown) TMPR3927 - Toshiba TMPR3927CF Risc Microprocessor (QFP240) FLASH - Fujitsu 29F400TC Flash ROM (TSOP48) - IDE44 - IDE44 44-pin laptop type HDD connector. The Hard Drive connected is a + IDE44 - IDE44 44-pin laptop type HDD connector. The Hard Drive connected is a 2.5" Fujitsu MHR2010AT 10GB HDD with Konami sticker C07JAA03 48LC4M16 - Micron Technology 48LC4M16 4M x16-bit SDRAM (TSSOP54) XC9572XL - XILINX XC9572XL In-system Programmable CPLD stamped 'UC07A1' (TQFP100) @@ -57,7 +57,7 @@ 93LC46 - 128 bytes x8-bit EEPROM (SOIC8) MB3793 - Fujitsu MB3793 Power-Voltage Monitoring IC with Watchdog Timer (SOIC8) PE68515L - Pulse PE-68515L 10/100 Base-T Single Port Transformer Module - DP83815 - National Semiconductor DP83815 10/100 Mb/s Integrated PCI Ethernet Media + DP83815 - National Semiconductor DP83815 10/100 Mb/s Integrated PCI Ethernet Media Access Controller and Physical Layer (TQFP144) SP232 - Sipex Corporation SP232 Enhanced RS-232 Line Drivers/Receiver (SOIC16) RJ45 - RJ45 network connector @@ -82,7 +82,7 @@ void k573npu_device::device_start() ROM_START( k573npu ) ROM_REGION( 0x080000, "tmpr3927", 0 ) - ROM_LOAD( "29f400.24e", 0x000000, 0x080000, CRC(8dcf294b) SHA1(efac79e18db22c30886463ec1bc448187da7a95a) ) + ROM_LOAD( "29f400.24e", 0x000000, 0x080000, CRC(8dcf294b) SHA1(efac79e18db22c30886463ec1bc448187da7a95a) ) ROM_END const rom_entry *k573npu_device::device_rom_region() const diff --git a/src/mame/machine/pgmprot_igs027a_type3.c b/src/mame/machine/pgmprot_igs027a_type3.c index c94b6da5cd..167dc297be 100644 --- a/src/mame/machine/pgmprot_igs027a_type3.c +++ b/src/mame/machine/pgmprot_igs027a_type3.c @@ -54,13 +54,13 @@ WRITE32_MEMBER(pgm_arm_type3_state::svg_arm7_ram_sel_w ) READ32_MEMBER(pgm_arm_type3_state::svg_arm7_shareram_r ) { UINT32 retdata = m_svg_shareram[m_svg_ram_sel & 1][offset]; -// printf("(%08x) ARM7: shared read (bank %02x) offset - %08x retdata - %08x mask - %08x\n", space.device().safe_pc(), m_svg_ram_sel, offset*4, retdata, mem_mask ); +// printf("(%08x) ARM7: shared read (bank %02x) offset - %08x retdata - %08x mask - %08x\n", space.device().safe_pc(), m_svg_ram_sel, offset*4, retdata, mem_mask ); return retdata; } WRITE32_MEMBER(pgm_arm_type3_state::svg_arm7_shareram_w ) { -// printf("(%08x) ARM7: shared write (bank %02x) offset - %08x retdata - %08x mask - %08x\n", space.device().safe_pc(), m_svg_ram_sel, offset*4, data, mem_mask ); +// printf("(%08x) ARM7: shared write (bank %02x) offset - %08x retdata - %08x mask - %08x\n", space.device().safe_pc(), m_svg_ram_sel, offset*4, data, mem_mask ); COMBINE_DATA(&m_svg_shareram[m_svg_ram_sel & 1][offset]); } @@ -145,7 +145,7 @@ static ADDRESS_MAP_START( 55857G_arm7_map, AS_PROGRAM, 32, pgm_arm_type3_state ) AM_RANGE(0x40000018, 0x4000001b) AM_WRITE(svg_arm7_ram_sel_w) /* RAM SEL */ AM_RANGE(0x50000000, 0x500003ff) AM_RAM -// AM_RANGE(0xc0000000, 0xffffffff) AM_RAM +// AM_RANGE(0xc0000000, 0xffffffff) AM_RAM ADDRESS_MAP_END @@ -169,7 +169,7 @@ MACHINE_RESET_MEMBER(pgm_arm_type3_state, pgm_arm_type3_reset) int regionhack = ioport("RegionHack")->read(); if (regionhack != 0xff) { -// printf("%04x\n", temp16[(base) / 2]); +// printf("%04x\n", temp16[(base) / 2]); temp16[(base) / 2] = regionhack; base += 2; } } @@ -260,7 +260,7 @@ READ32_MEMBER(pgm_arm_type3_state::svg_speedup_r ) { int pc = space.device().safe_pc(); if (pc == 0x9e0) space.device().execute().eat_cycles(500); -// else printf("killbldp_speedup_r %08x\n", pc); +// else printf("killbldp_speedup_r %08x\n", pc); return m_armrom[0x9e0/4]; } @@ -376,7 +376,7 @@ void pgm_arm_type3_state::pgm_create_dummy_internal_arm_region_theglad(int is_sv temp16[(base) /2] = 0xE080; base += 2; temp16[(base) /2] = 0x6000; base += 2; temp16[(base) /2] = 0xE587; base += 2; - + // set the SR13 to something sensible temp16[(base) /2] = 0x00D3; base += 2; temp16[(base) /2] = 0xE3A0; base += 2; @@ -410,12 +410,12 @@ void pgm_arm_type3_state::pgm_create_dummy_internal_arm_region_theglad(int is_sv base = 0x154; // this actually makes matters worse here -// temp16[(base) / 2] = 0x1010; base += 2; -// temp16[(base) / 2] = 0xe59f; base += 2; -// temp16[(base) / 2] = 0x0001; base += 2; -// temp16[(base) / 2] = 0xe3a0; base += 2; -// temp16[(base) / 2] = 0x0000; base += 2; -// temp16[(base) / 2] = 0xe581; base += 2; +// temp16[(base) / 2] = 0x1010; base += 2; +// temp16[(base) / 2] = 0xe59f; base += 2; +// temp16[(base) / 2] = 0x0001; base += 2; +// temp16[(base) / 2] = 0xe3a0; base += 2; +// temp16[(base) / 2] = 0x0000; base += 2; +// temp16[(base) / 2] = 0xe581; base += 2; temp16[(base) / 2] = 0xf000; base += 2; temp16[(base) / 2] = 0xe59f; base += 2; @@ -424,12 +424,12 @@ void pgm_arm_type3_state::pgm_create_dummy_internal_arm_region_theglad(int is_sv temp16[(base) / 2] = 0x0028; base += 2; temp16[(base) / 2] = 0x0800; base += 2; -// temp16[(base) / 2] = 0x003c; base += 2; -// temp16[(base) / 2] = 0x1000; base += 2; +// temp16[(base) / 2] = 0x003c; base += 2; +// temp16[(base) / 2] = 0x1000; base += 2; } - + base = 0; temp16[(base) /2] = 0x000a; base += 2; temp16[(base) /2] = 0xEA00; base += 2; @@ -459,7 +459,7 @@ void pgm_arm_type3_state::pgm_create_dummy_internal_arm_region_theglad(int is_sv temp16[(base) /2] = 0xFF1E; base += 2; temp16[(base) /2] = 0xE12F; base += 2; -// base = 0xfc; // already at 0xfc +// base = 0xfc; // already at 0xfc temp16[(base) /2] = 0xE004; base += 2; // based on killbldp temp16[(base) /2] = 0xE52D; base += 2; temp16[(base) /2] = 0x0013; base += 2; @@ -471,11 +471,11 @@ void pgm_arm_type3_state::pgm_create_dummy_internal_arm_region_theglad(int is_sv temp16[(base) /2] = 0xFF1E; base += 2; temp16[(base) /2] = 0xE12F; base += 2; -// base = 0x110; // already at 0x110 -// temp16[(base) /2] = 0xff1e; base += 2; -// temp16[(base) /2] = 0xe12f; base += 2; -// temp16[(base) /2] = 0xf302; base += 2; -// temp16[(base) /2] = 0xe3a0; base += 2; +// base = 0x110; // already at 0x110 +// temp16[(base) /2] = 0xff1e; base += 2; +// temp16[(base) /2] = 0xe12f; base += 2; +// temp16[(base) /2] = 0xf302; base += 2; +// temp16[(base) /2] = 0xe3a0; base += 2; // set up stack again, soft-reset reset with a ram variable set to 0 temp16[(base) /2] = 0x00D1; base += 2; temp16[(base) /2] = 0xE3A0; base += 2; @@ -499,7 +499,7 @@ void pgm_arm_type3_state::pgm_create_dummy_internal_arm_region_theglad(int is_sv temp16[(base) /2] = 0xE3A0; base += 2; - + base = 0x150; temp16[(base) /2] = 0xff1e; base += 2; @@ -517,10 +517,10 @@ DRIVER_INIT_MEMBER(pgm_arm_type3_state,theglad) svg_basic_init(); pgm_theglad_decrypt(machine()); svg_latch_init(); -// pgm_create_dummy_internal_arm_region(0x188); +// pgm_create_dummy_internal_arm_region(0x188); pgm_create_dummy_internal_arm_region_theglad(0); - + machine().device("prot")->memory().space(AS_PROGRAM).install_read_handler(0x1000000c, 0x1000000f, read32_delegate(FUNC(pgm_arm_type3_state::theglad_speedup_r),this)); } @@ -606,11 +606,11 @@ void pgm_arm_type3_state::pgm_patch_external_arm_rom_jumptable_theglada(int base for (int i = 0; i < 131; i++) { -// UINT32 addr = extprot[(base/2)] | (extprot[(base/2) + 1] << 16); +// UINT32 addr = extprot[(base/2)] | (extprot[(base/2) + 1] << 16); extprot[(base / 2)] = subroutine_addresses[i]; base += 4; -// printf("%04x (%08x)\n", subroutine_addresses[i], addr ); +// printf("%04x (%08x)\n", subroutine_addresses[i], addr ); } } @@ -619,7 +619,7 @@ DRIVER_INIT_MEMBER(pgm_arm_type3_state, theglada) DRIVER_INIT_CALL(theglad); pgm_patch_external_arm_rom_jumptable_theglada(0x82078); - + } INPUT_PORTS_START( theglad ) @@ -692,18 +692,18 @@ DRIVER_INIT_MEMBER(pgm_arm_type3_state,killbldp) machine().device("prot")->memory().space(AS_PROGRAM).install_read_handler(0x1000000c, 0x1000000f, read32_delegate(FUNC(pgm_arm_type3_state::killbldp_speedup_r),this)); -// UINT16 *temp16 = (UINT16 *)memregion("prot")->base(); -// int base = 0xfc; // startup table uploads -// temp16[(base) /2] = 0x0000; base += 2; -// temp16[(base) /2] = 0xE1A0; base += 2; - -// base = 0xd4; // startup table uploads -// temp16[(base) /2] = 0x0000; base += 2; -// temp16[(base) /2] = 0xE1A0; base += 2; +// UINT16 *temp16 = (UINT16 *)memregion("prot")->base(); +// int base = 0xfc; // startup table uploads +// temp16[(base) /2] = 0x0000; base += 2; +// temp16[(base) /2] = 0xE1A0; base += 2; + +// base = 0xd4; // startup table uploads +// temp16[(base) /2] = 0x0000; base += 2; +// temp16[(base) /2] = 0xE1A0; base += 2; // -// base = 0x120; // reset game state, uncomment this to break boot sequence how theglad was broken... -// temp16[(base) /2] = 0x0000; base += 2; -// temp16[(base) /2] = 0xE1A0; base += 2; +// base = 0x120; // reset game state, uncomment this to break boot sequence how theglad was broken... +// temp16[(base) /2] = 0x0000; base += 2; +// temp16[(base) /2] = 0xE1A0; base += 2; } @@ -757,7 +757,7 @@ void pgm_arm_type3_state::pgm_descramble_happy6(UINT8* src) { UINT8* buffer = auto_alloc_array(machine(), UINT8, 0x800000); int writeaddress = 0; - + for (int j = 0; j < 0x800; j += 0x200) { for (int i = j; i < 0x800000; i += 0x800) @@ -807,7 +807,7 @@ INPUT_PORTS_END DRIVER_INIT_MEMBER(pgm_arm_type3_state,happy6) { UINT8 *src; - + src = (UINT8 *)(machine().root_device().memregion("tiles")->base()) + 0x180000; pgm_descramble_happy6(src); pgm_descramble_happy6_2(src); diff --git a/src/mame/machine/pgmprot_orlegend.c b/src/mame/machine/pgmprot_orlegend.c index 05f56fb256..6e98fda279 100644 --- a/src/mame/machine/pgmprot_orlegend.c +++ b/src/mame/machine/pgmprot_orlegend.c @@ -81,8 +81,8 @@ READ16_MEMBER(pgm_asic3_state::pgm_asic3_r) case 0x33: return 0x49; case 0x34: return 0x32; - // default: - // logerror("ASIC3 R: CMD %2.2X PC: %6.6x\n", m_asic3_reg, space.device().safe_pc()); + // default: + // logerror("ASIC3 R: CMD %2.2X PC: %6.6x\n", m_asic3_reg, space.device().safe_pc()); } return 0; @@ -103,10 +103,10 @@ WRITE16_MEMBER(pgm_asic3_state::pgm_asic3_w) m_asic3_latch[m_asic3_reg] = data << 1; break; - // case 0x03: // move.w #$88, $c0400e.l - // case 0x04: // move.w #$84, $c0400e.l - // case 0x05: // move.w #$A0, $c0400e.l - // break; + // case 0x03: // move.w #$88, $c0400e.l + // case 0x04: // move.w #$84, $c0400e.l + // case 0x05: // move.w #$A0, $c0400e.l + // break; case 0x40: m_asic3_hilo = (m_asic3_hilo << 8) | data; @@ -131,8 +131,8 @@ WRITE16_MEMBER(pgm_asic3_state::pgm_asic3_w) } break; - // case 0x50: // move.w #$50, $c0400e.l - // break; + // case 0x50: // move.w #$50, $c0400e.l + // break; case 0x80: case 0x81: @@ -150,7 +150,7 @@ WRITE16_MEMBER(pgm_asic3_state::pgm_asic3_w) break; default: - logerror("ASIC3 W: CMD %2.2X DATA: %4.4x, PC: %6.6x\n", m_asic3_reg, data, space.device().safe_pc()); + logerror("ASIC3 W: CMD %2.2X DATA: %4.4x, PC: %6.6x\n", m_asic3_reg, data, space.device().safe_pc()); } } diff --git a/src/mame/machine/seicop.c b/src/mame/machine/seicop.c index 6c7c8ca6a2..3cda84f591 100644 --- a/src/mame/machine/seicop.c +++ b/src/mame/machine/seicop.c @@ -1649,7 +1649,7 @@ seibu_cop_legacy_device::seibu_cop_legacy_device(const machine_config &mconfig, memset(m_cop_dma_size, 0, sizeof(UINT16)*0x200); memset(m_cop_dma_dst, 0, sizeof(UINT16)*0x200); memset(m_seibu_vregs, 0, sizeof(UINT16)*0x50/2); - + for (int i = 0; i < 8; i++) { m_cop_register[i] = 0; @@ -1673,7 +1673,7 @@ void seibu_cop_legacy_device::device_config_complete() void seibu_cop_legacy_device::device_start() { m_cop_mcu_ram = reinterpret_cast(machine().root_device().memshare("cop_mcu_ram")->ptr()); - + save_item(NAME(m_cop_438)); save_item(NAME(m_cop_43a)); save_item(NAME(m_cop_43c)); @@ -2238,7 +2238,7 @@ READ16_MEMBER( seibu_cop_legacy_device::generic_cop_r ) WRITE16_MEMBER( seibu_cop_legacy_device::generic_cop_w ) { UINT32 temp32; - + switch (offset) { default: diff --git a/src/mame/machine/seicop.h b/src/mame/machine/seicop.h index 1632ef77b1..45dd4dcb1e 100644 --- a/src/mame/machine/seicop.h +++ b/src/mame/machine/seicop.h @@ -11,7 +11,7 @@ struct collision_info hitbox(0), hitbox_x(0), hitbox_y(0) {} - + int x,y; INT16 min_x,min_y,max_x,max_y; UINT16 hitbox; @@ -41,8 +41,8 @@ seibu_cop_legacy_device(const machine_config &mconfig, const char *tag, device_t DECLARE_READ16_MEMBER( legionna_mcu_r ); DECLARE_WRITE16_MEMBER( legionna_mcu_w ); - //DECLARE_READ16_MEMBER( raiden2_mcu_r ); unused - //DECLARE_WRITE16_MEMBER( raiden2_mcu_w ); unused + //DECLARE_READ16_MEMBER( raiden2_mcu_r ); unused + //DECLARE_WRITE16_MEMBER( raiden2_mcu_w ); unused protected: // device-level overrides @@ -97,4 +97,4 @@ private: extern const device_type SEIBU_COP_LEGACY; #define MCFG_SEIBU_COP_ADD(_tag) \ - MCFG_DEVICE_ADD(_tag, SEIBU_COP_LEGACY, 0) + MCFG_DEVICE_ADD(_tag, SEIBU_COP_LEGACY, 0) diff --git a/src/mame/machine/zs01.h b/src/mame/machine/zs01.h index 5192881db3..80f0cec2d0 100644 --- a/src/mame/machine/zs01.h +++ b/src/mame/machine/zs01.h @@ -15,8 +15,7 @@ #include "machine/ds2401.h" #define MCFG_ZS01_ADD( _tag ) \ - MCFG_DEVICE_ADD( _tag, ZS01, 0 ) \ - + MCFG_DEVICE_ADD( _tag, ZS01, 0 ) #define MCFG_ZS01_DS2401( ds2401_tag ) \ zs01_device::static_set_ds2401_tag( *device, ds2401_tag ); diff --git a/src/mame/mame.lst b/src/mame/mame.lst index a185291b6d..b6d1df0db9 100644 --- a/src/mame/mame.lst +++ b/src/mame/mame.lst @@ -307,7 +307,7 @@ explorer // bootleg strfbomb // bootleg scrambp // bootleg (Billport S.A.) scrampt // bootleg (Petaco S.A.) -scramrf // bootleg (Recreativos Franco) +scramrf // bootleg (Recreativos Franco) atlantis // (c) 1981 Comsoft atlantis2 // (c) 1981 Comsoft theend // (c) 1980 Konami @@ -1629,7 +1629,7 @@ stargrds // (c) 1987 maxrpm // (c) 1986 spyhunt // (c) 1983 spyhuntp // (c) 1983 -spyhuntpr // +spyhuntpr // turbotag // (c) 1985 crater // (c) 1984 // MCR 68000 @@ -2113,11 +2113,11 @@ cadashu // C21 (c) 1989 Taito America Corporation cadashi // C21 (c) 1989 Taito Corporation Japan cadashf // C21 (c) 1989 Taito Corporation Japan cadashg // C21 (c) 1989 Taito Corporation Japan -cadashp // prototype +cadashp // prototype parentj // C42 (c) 199? Taito galmedes // (c) 1992 Visco (Japan) earthjkr // (c) 1993 Visco (Japan) -earthjkrp // +earthjkrp // eto // (c) 1994 Visco (Japan) wgp // C32 (c) 1989 Taito America Corporation (US) wgpj // C32 (c) 1989 Taito Corporation (Japan) @@ -2219,7 +2219,7 @@ lagirl // plgirls bootleg? // Taito H-System games syvalion // B51 (c) 1988 Taito Corporation (Japan) -syvalionp // +syvalionp // recordbr // B56 (c) 1988 Taito Corporation Japan (World) gogold // B56 (c) 1988 Taito Corporation (Japan) dleague // C02 (c) 1990 Taito America Corporation (US) @@ -2309,14 +2309,14 @@ gunbustrj // D27 (c) 1992 Taito Corporation (Japan) superchs // D46 (c) 1992 Taito Corporation Japan (World) superchsu // D46 (c) 1992 Taito America Corporation (US) superchsj // D46 (c) 1992 Taito Corporation (Japan) -superchsp // prototype +superchsp // prototype groundfx // D51 (c) 1992 Taito Coporation undrfire // D67 (c) 1993 Taito Coporation Japan (World) undrfireu // D67 (c) 1993 Taito America Corporation (US) undrfirej // D67 (c) 1993 Taito Coporation (Japan) cbombers // D83 (c) 1993 Taito Coporation Japan (World) cbombersj // D83 (c) 1993 Taito Coporation (Japan) -cbombersp // +cbombersp // // Taito F2 games finalb // 1989.?? B82 (c) 1988 Taito Corporation Japan (World) @@ -2653,7 +2653,7 @@ batsugun // TP-030 (c) 1993 Toaplan batsuguna // TP-030 (c) 1993 Toaplan batsugunsp // TP-??? (c) 1993 Toaplan snowbro2 // TP-??? (c) 1994 Hanafram -pwrkick // (c) 1994 Sunwise +pwrkick // (c) 1994 Sunwise sstriker // (c) 1993 Raizing sstrikera // (c) 1993 Raizing mahoudai // (c) 1993 Raizing + Able license @@ -2862,7 +2862,7 @@ higemaru // 9/1984 (c) 1984 1942abl // bootleg 1942b // 12/1984 (c) 1984 1942w // 12/1984 (c) 1984 + Williams Electronics license (c) 1985 -1942p // prototype +1942p // prototype exedexes // 2/1985 (c) 1985 savgbees // 2/1985 (c) 1985 + Memetron license commando // 5/1985 (c) 1985 (World) @@ -5132,7 +5132,7 @@ f355bios // 1999.07 F355 Challenge (BIOS) f355 // 1999.07 F355 Challenge f355twin // 1999.07 F355 Challenge Twin shangril // 1999.08 Dengen Tenshi Taisen Janshi Shangri-la -tduno // 1999.08 Touch de UNO! / Unou Nouryoku Check Machine +tduno // 1999.08 Touch de UNO! / Unou Nouryoku Check Machine vs2_2k // 1999.08 Virtua Striker 2 version 2000 (Rev C) suchie3 // 1999.09 Idol Janshi Su-Chi-Pi 3 jambo // 1999.09 Jambo! Safari (Rev A) @@ -5612,7 +5612,7 @@ cbdash // 44 1985.08 Boulder Dash begas // (c) 1983 begas1 // (c) 1983 cobra // (c) 1984 -cobraa // +cobraa // rblaster // (c) 1985 // other Data East games @@ -8938,7 +8938,7 @@ starfigh // (c) 1990 SunA hardhea2 // (c) 1991 SunA brickzn // (c) 1992 SunA brickznv4 // (c) 1992 SunA -brickzn11 // (c) 1992 SunA +brickzn11 // (c) 1992 SunA bestbest // (c) 1994 SunA sunaq // (c) 1994 SunA bssoccer // (c) 1996 SunA @@ -9271,7 +9271,7 @@ mmpanic // "70" 1992 Nakanihon/Taito quizchq // "73" (c) 1993 Nakanihon quizchql // "73" (c) 1993 Laxan funkyfig // "74" (c) 1993 Nakanihon + East Technology -funkyfiga // +funkyfiga // animaljr // "75" 1993 Nakanihon/Taito (USA) animaljrs // "75" 1993 Nakanihon/Taito (Spanish version) animaljrj // "75" 1993 Nakanihon/Taito (Japan) @@ -9527,7 +9527,7 @@ martmastc // martmastc102 // theglad // (c) 2003 The Gladiator theglad100 // -theglad101 // +theglad101 // thegladpcb // dw2001 // (c) 2001 Dragon World 2001 dwpc // (c) 2001 Dragon World Pretty Chance @@ -9744,7 +9744,7 @@ pzletime ar_bios ar_airh // (c) 1988 ar_airh2 // (c) 1988 -ar_blast // (c) 1988 +ar_blast // (c) 1988 ar_bowl // (c) 1988 ar_dart // (c) 1987 ar_dart2 // (c) 1987 @@ -9755,7 +9755,7 @@ ar_ldrba // (c) 1988 v2.4 ar_ldrbb // (c) 1988 ar_ninj // (c) 1987 ar_ninj2 // (c) 1987 -ar_pm // (c) 198? +ar_pm // (c) 198? ar_rdwr // (c) 1988 ar_sdwr // (c) 1988 ar_sdwr2 // (c) 1988 @@ -9763,7 +9763,7 @@ ar_socc // (c) 1989 ar_spot // (c) 1990 ar_sprg // (c) 1987 ar_xeon // (c) 1988 -ar_dlta // (c) 198? +ar_dlta // (c) 198? // Sente Super System mquake // (c) 1987 @@ -9977,7 +9977,7 @@ nost // (c) 1993 Face nostj // (c) 1993 Face nostk // (c) 1993 Face 4enraya // (c) 1990 IDSA -4enrayaa // +4enrayaa // unkpacg // (c) 19?? ??? oneshot // no copyright notice maddonna // (c) 1995 Tuning @@ -10447,7 +10447,7 @@ tattack // (c) 198? Shonan mosaicf2 // (c) 1999 F2 System finalgdr // (c) 2001 Semicom mrkicker // (c) 2001 Semicom -wivernwg // (c) 2001 Semicom +wivernwg // (c) 2001 Semicom wyvernwg // (c) 2001 Semicom / Game Vision wyvernwga // (c) 2001 Semicom / Game Vision rbmk // (c) 1995 GMS diff --git a/src/mame/video/1942.c b/src/mame/video/1942.c index 1a51439b70..b4869d21d4 100644 --- a/src/mame/video/1942.c +++ b/src/mame/video/1942.c @@ -26,8 +26,6 @@ void _1942_state::create_palette() { - - const UINT8 *color_prom = memregion("proms")->base(); int i; @@ -63,7 +61,7 @@ void _1942_state::palette_init() machine().colortable = colortable_alloc(machine(), 0x600); create_palette(); - + const UINT8 *color_prom = memregion("proms")->base(); int i, colorbase; color_prom += 3 * 256; @@ -97,13 +95,13 @@ void _1942_state::palette_init() { colortable_entry_set_value(machine().colortable, i, i); } - + } void _1942_state::palette_init_1942p() { machine().colortable = colortable_alloc(machine(), 0x500); - + for (int i = 0; i < 0x400; i++) { colortable_entry_set_value(machine().colortable, i, i); @@ -291,8 +289,8 @@ void _1942_state::draw_sprites_p( bitmap_ind16 &bitmap, const rectangle &cliprec code = (m_spriteram[offs] & 0x7f) + 4 * (m_spriteram[offs + 3] & 0x20) + 2 * (m_spriteram[offs] & 0x80); col = m_spriteram[offs + 3] & 0x0f; - - + + sx = m_spriteram[offs + 2] - 0x10 * (m_spriteram[offs + 3] & 0x10); sy = m_spriteram[offs + 1]; diff --git a/src/mame/video/hng64.c b/src/mame/video/hng64.c index f3f7b5b533..8409527041 100644 --- a/src/mame/video/hng64.c +++ b/src/mame/video/hng64.c @@ -1637,7 +1637,7 @@ void hng64_state::screen_eof_hng64(screen_device &screen, bool state) { // rising edge //if (state) - // clear3d(); + // clear3d(); } void hng64_state::video_start() diff --git a/src/mame/video/tia.c b/src/mame/video/tia.c index f8258c98a4..131a8895df 100644 --- a/src/mame/video/tia.c +++ b/src/mame/video/tia.c @@ -51,76 +51,76 @@ PALETTE_INIT_MEMBER(tia_ntsc_video_device, tia_ntsc) /******************************************************************** Atari 2600 NTSC Palette Notes: -Palette on a modern flat panel display (LCD, LED, Plasma, etc.) -appears different from a traditional CRT. The most outstanding -difference is Hue 1x, the hue begin point. Hue 1x looks very -'green' (~-60 to -45 degrees - depending on how poor or well it -handles the signal conversion and its calibration) on a modern +Palette on a modern flat panel display (LCD, LED, Plasma, etc.) +appears different from a traditional CRT. The most outstanding +difference is Hue 1x, the hue begin point. Hue 1x looks very +'green' (~-60 to -45 degrees - depending on how poor or well it +handles the signal conversion and its calibration) on a modern flat panel display, as opposed to 'gold' (~-33 degrees) on a CRT. -The official technical documents: "Television Interface Adaptor -[TIA] (Model 1A)", "Atari VCS POP Field Service Manual", and +The official technical documents: "Television Interface Adaptor +[TIA] (Model 1A)", "Atari VCS POP Field Service Manual", and "Stella Programmer's Guide" stipulate Hue 1x to be gold. -The system's pot adjustment manually manipulates the degree of -phase shift, while the system 'warming-up' will automatically -push whatever degrees has been manually set, higher. According -to the Atari VCS POP Field Service Manual and system diagnostic -and test (color) cart, instructions are provide to set the pot -adjustment having Hue 1x and Hue 15x (F$) match or within one +The system's pot adjustment manually manipulates the degree of +phase shift, while the system 'warming-up' will automatically +push whatever degrees has been manually set, higher. According +to the Atari VCS POP Field Service Manual and system diagnostic +and test (color) cart, instructions are provide to set the pot +adjustment having Hue 1x and Hue 15x (F$) match or within one shade of each other, both a 'goldenrod'. -At power on, the system's phase shift appears as low as ~23 -degrees and after a considerable consistent runtime, can be as -high as ~28 degrees. - -In general, the low end of ~23 degrees lasts for several seconds, -whereas higher values such as ~25-27 degrees are the most -dominant during system run time. 180 degrees colorburst takes -place at ~25.7 degrees (A near exact match of Hue 1x and 15x - -To the naked eye they appear to be the same). - -However, if the system is adjusted within the first several -minutes of running, the warm up, consistent system run time, -causes Hue 15x (F$) to become stronger/darker gold (More brown -then ultimately red-brown); as well as leans Hue 14x (E$) more -brown than green. Once achieving a phase shift of 27.7 degrees, -Hue 14x (E$) and Hue 15x (F$) near-exact match Hue 1x and 2x -respectively. - -Therefore, an ideal phase shift while accounting for properly -calibrating a system's color palette within the first several -minutes of it running via the pot adjustment, the reality of -shifting while warming up, as well as maintaining differences -between Hues 1x, 2x and 14x, 15x, would likely fall between 25.7 -and 27.7 degrees. Phase shifts 26.2 and 26.7 places Hue 15x/F$ -between Hue 1x and Hue 2x, having 26.2 degrees leaning closer to +At power on, the system's phase shift appears as low as ~23 +degrees and after a considerable consistent runtime, can be as +high as ~28 degrees. + +In general, the low end of ~23 degrees lasts for several seconds, +whereas higher values such as ~25-27 degrees are the most +dominant during system run time. 180 degrees colorburst takes +place at ~25.7 degrees (A near exact match of Hue 1x and 15x - +To the naked eye they appear to be the same). + +However, if the system is adjusted within the first several +minutes of running, the warm up, consistent system run time, +causes Hue 15x (F$) to become stronger/darker gold (More brown +then ultimately red-brown); as well as leans Hue 14x (E$) more +brown than green. Once achieving a phase shift of 27.7 degrees, +Hue 14x (E$) and Hue 15x (F$) near-exact match Hue 1x and 2x +respectively. + +Therefore, an ideal phase shift while accounting for properly +calibrating a system's color palette within the first several +minutes of it running via the pot adjustment, the reality of +shifting while warming up, as well as maintaining differences +between Hues 1x, 2x and 14x, 15x, would likely fall between 25.7 +and 27.7 degrees. Phase shifts 26.2 and 26.7 places Hue 15x/F$ +between Hue 1x and Hue 2x, having 26.2 degrees leaning closer to Hue 1x and 26.7 degrees leaning closer to Hue 2x. - -The above notion would also harmonize with what has been -documented within "Stella Programmer's Guide" for the colors of -1x, 2x, 14x, 15x on the 2600 and 7800. 1x = Gold, 2x = Orange, -14x (E$) = Orange-Green. 15x (F$) = Light Orange. Color -descriptions are best measured in the middle of the brightness -scale. It should be mentioned that Green-Yellow is referenced -at Hue 13x (D$), nowhere near Hue 1x. A Green-Yellow Hue 1x is -how the palette is manipulated and modified (in part) under a + +The above notion would also harmonize with what has been +documented within "Stella Programmer's Guide" for the colors of +1x, 2x, 14x, 15x on the 2600 and 7800. 1x = Gold, 2x = Orange, +14x (E$) = Orange-Green. 15x (F$) = Light Orange. Color +descriptions are best measured in the middle of the brightness +scale. It should be mentioned that Green-Yellow is referenced +at Hue 13x (D$), nowhere near Hue 1x. A Green-Yellow Hue 1x is +how the palette is manipulated and modified (in part) under a modern flat panel display. -Additionally, the blue to red (And consequently blue to green) -ratio proportions may appear different on a modern flat panel -display than a CRT in some instances for the Atari 2600 system. -Furthermore, you may have some variation of proportions even +Additionally, the blue to red (And consequently blue to green) +ratio proportions may appear different on a modern flat panel +display than a CRT in some instances for the Atari 2600 system. +Furthermore, you may have some variation of proportions even within the same display type. - -One side effect of this on the console's palette is that some -values of red may appear too pinkish - Too much blue to red. -This is not the same as a traditional tint-hue control adjustment; -rather, can be demonstrated by changing the blue ratio values + +One side effect of this on the console's palette is that some +values of red may appear too pinkish - Too much blue to red. +This is not the same as a traditional tint-hue control adjustment; +rather, can be demonstrated by changing the blue ratio values via MESS HLSL settings. -Lastly, the Atari 5200 & 7800 NTSC color palettes hold the same -hue structure order and have similar appearance differences that +Lastly, the Atari 5200 & 7800 NTSC color palettes hold the same +hue structure order and have similar appearance differences that are dependent upon display type. ********************************************************************/ /********************************* diff --git a/src/mess/drivers/a7800.c b/src/mess/drivers/a7800.c index 75c529c71b..52394423c3 100644 --- a/src/mess/drivers/a7800.c +++ b/src/mess/drivers/a7800.c @@ -70,7 +70,7 @@ 2013/11/03 Robert Tuccitto Fixed correctly typo under 26.7 7$. - 2014/11/23 Robert Tuccitto Added NTSC Palette Notes + 2014/11/23 Robert Tuccitto Added NTSC Palette Notes ***************************************************************************/ #include "emu.h" @@ -159,60 +159,60 @@ INPUT_PORTS_END /*************************************************************************** Atari 7800 NTSC Palette Notes: -Palette on a modern flat panel display (LCD, LED, Plasma, etc.) appears -different from a traditional CRT. The most outstanding difference is Hue 1x, -the hue begin point. Hue 1x looks very 'green' (~-60 to -45 degrees - -depending on how poor or well it handles the signal conversion and its -calibration) on a modern flat panel display, as opposed to 'gold' (~-33 -degrees) on a CRT. +Palette on a modern flat panel display (LCD, LED, Plasma, etc.) appears +different from a traditional CRT. The most outstanding difference is Hue 1x, +the hue begin point. Hue 1x looks very 'green' (~-60 to -45 degrees - +depending on how poor or well it handles the signal conversion and its +calibration) on a modern flat panel display, as opposed to 'gold' (~-33 +degrees) on a CRT. -The system's pot adjustment manually manipulates the ratio of blue to -green/blue to red, while the system 'warming-up' causes the palette phase +The system's pot adjustment manually manipulates the ratio of blue to +green/blue to red, while the system 'warming-up' causes the palette phase shift to go higher in degrees. -At power on, the system's phase shift appears as low as ~23 degrees and -after a considerable consistent runtime, can be as high as ~28 degrees. - -In general, the low end of ~23 degrees lasts for maybe several seconds, -whereas higher values such as ~25-27 degrees is the most dominant during -system run time. 180 degrees colorburst takes place at ~25.7 degrees (A -near exact match of Hue 1x and 15x - To the naked eye they appear to be -the same). - -However, if the system is adjusted within the first several minutes of -running, the warm up, consistent system run time, causes Hue 15x (F$) to -become stronger/darker gold (More brown then ultimately red-brown); as well -as leans Hue 14x (E$) more brown than green. Once achieving a phase shift -of 27.7, Hue 14x (E$) and Hue 15x (F$) near-exact match Hue 1x and 2x -respectively. - -Therefore, an ideal phase shift while accounting for the reality of -shifting while warming up, as well as maintaining differences between 1x, -2x and 14x, 15x, would likely fall between a 25.7 and 27.7. Phase shifts -26.2 degrees and 26.7 degrees places Hue 15x (F$) between Hue 1x and -Hue 2x, having 26.2 degrees leaning closer to Hue 1x and 26.7 degrees +At power on, the system's phase shift appears as low as ~23 degrees and +after a considerable consistent runtime, can be as high as ~28 degrees. + +In general, the low end of ~23 degrees lasts for maybe several seconds, +whereas higher values such as ~25-27 degrees is the most dominant during +system run time. 180 degrees colorburst takes place at ~25.7 degrees (A +near exact match of Hue 1x and 15x - To the naked eye they appear to be +the same). + +However, if the system is adjusted within the first several minutes of +running, the warm up, consistent system run time, causes Hue 15x (F$) to +become stronger/darker gold (More brown then ultimately red-brown); as well +as leans Hue 14x (E$) more brown than green. Once achieving a phase shift +of 27.7, Hue 14x (E$) and Hue 15x (F$) near-exact match Hue 1x and 2x +respectively. + +Therefore, an ideal phase shift while accounting for the reality of +shifting while warming up, as well as maintaining differences between 1x, +2x and 14x, 15x, would likely fall between a 25.7 and 27.7. Phase shifts +26.2 degrees and 26.7 degrees places Hue 15x (F$) between Hue 1x and +Hue 2x, having 26.2 degrees leaning closer to Hue 1x and 26.7 degrees leaning closer to Hue 2x. -The above notion would also harmonize with what has been documented for -the colors of 1x, 2x, 14x, 15x on the 7800. 1x = Gold, 2x = Orange, -14x (E$) = Orange-Green. 15x (F$) = Light Orange. Color descriptions are -best measured in the middle of the brightness scale. It should be +The above notion would also harmonize with what has been documented for +the colors of 1x, 2x, 14x, 15x on the 7800. 1x = Gold, 2x = Orange, +14x (E$) = Orange-Green. 15x (F$) = Light Orange. Color descriptions are +best measured in the middle of the brightness scale. It should be mentioned that Green-Yellow is referenced at Hue 13x (D$), nowhere near -Hue 1x. A Green-Yellow Hue 1x is how the palette is manipulated and +Hue 1x. A Green-Yellow Hue 1x is how the palette is manipulated and modified (in part) under a modern flat panel display. -Additionally, the blue to red (And consequently blue to green) ratio -proportions may appear different on a modern flat panel display than a CRT -in some instances for the Atari 7800 system. Furthermore, you may have +Additionally, the blue to red (And consequently blue to green) ratio +proportions may appear different on a modern flat panel display than a CRT +in some instances for the Atari 7800 system. Furthermore, you may have some variation of proportions even within the same display type. - -One side effect of this on the console's palette is that some values of -red may appear too pinkish - Too much blue to red. This is not the same -as a traditional tint-hue control adjustment; rather, can be demonstrated + +One side effect of this on the console's palette is that some values of +red may appear too pinkish - Too much blue to red. This is not the same +as a traditional tint-hue control adjustment; rather, can be demonstrated by changing the blue ratio values via MESS HLSL settings. -Lastly, the Atari 2600 & 5200 NTSC color palettes hold the same hue -structure order and have similar appearance differences that are dependent +Lastly, the Atari 2600 & 5200 NTSC color palettes hold the same hue +structure order and have similar appearance differences that are dependent upon display type. ***************************************************************************/ /*************************************************************************** diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c index de1254c9e5..5f9856b660 100644 --- a/src/mess/drivers/apple2gs.c +++ b/src/mess/drivers/apple2gs.c @@ -511,7 +511,7 @@ ROM_START(apple2gsr0) ROM_REGION(0x20000, "es5503", ROMREGION_ERASE00) ROM_END -ROM_START(apple2gsr0p) // 6/19/1986 Cortland prototype +ROM_START(apple2gsr0p) // 6/19/1986 Cortland prototype ROM_REGION(0xc00,"m50740",0) ROM_LOAD( "341s0345.bin", 0x000000, 0x000c00, CRC(48cd5779) SHA1(97e421f5247c00a0ca34cd08b6209df573101480) ) @@ -535,4 +535,3 @@ COMP( 1989, apple2gsr3lp, apple2gs, 0, apple2gs, apple2gs, driver_device, 0, COMP( 1987, apple2gsr1, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM01)", GAME_SUPPORTS_SAVE ) COMP( 1986, apple2gsr0, apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00)", GAME_SUPPORTS_SAVE ) COMP( 1986, apple2gsr0p,apple2gs, 0, apple2gsr1, apple2gs, driver_device, 0, "Apple Computer", "Apple IIgs (ROM00 prototype 6/19/1986)", GAME_SUPPORTS_SAVE ) - diff --git a/src/mess/drivers/atari400.c b/src/mess/drivers/atari400.c index 6c3f83e7ef..c5e5928faf 100644 --- a/src/mess/drivers/atari400.c +++ b/src/mess/drivers/atari400.c @@ -28,13 +28,13 @@ - Clean up the whole driver + cart + floppy structure 2013-11-06 Robert Tuccitto: - Updated Palette per 'CGIA D020577' and 'GTIA C014805', including + Updated Palette per 'CGIA D020577' and 'GTIA C014805', including normalized grayscale with proper color gradient. Added Phase Shift - values 24.7 thru 27.7 degrees in 0.5 degree increments. Enabled + values 24.7 thru 27.7 degrees in 0.5 degree increments. Enabled Phase Shift 26.2 degrees as default. 2013-11-23 Robert Tuccitto: - Added palette notes + Added palette notes ******************************************************************************/ @@ -754,73 +754,73 @@ static INPUT_PORTS_START( a5200 ) INPUT_PORTS_END /*************************************************************** -Atari 5200 Palette Notes: +Atari 5200 Palette Notes: -Palette on a modern flat panel display (LCD, LED, Plasma, etc.) -appears different from a traditional CRT. The most outstanding -difference is Hue 1x, the hue begin point. Hue 1x looks very -'green' (~-60 to -45 degrees - depending on how poor or well it -handles the signal conversion and its calibration) on a modern -flat panel display, as opposed to 'gold' (~-33 degrees) on a -CRT. The official technical document, "GTIA C014805 NTSC" +Palette on a modern flat panel display (LCD, LED, Plasma, etc.) +appears different from a traditional CRT. The most outstanding +difference is Hue 1x, the hue begin point. Hue 1x looks very +'green' (~-60 to -45 degrees - depending on how poor or well it +handles the signal conversion and its calibration) on a modern +flat panel display, as opposed to 'gold' (~-33 degrees) on a +CRT. The official technical document, "GTIA C014805 NTSC" stipulates Hue 1x as gold. -The "Atari 5200 Field Service Manual" provides two different -sets of instructions in harmony with utilizing the "PAM -Diagnostic SALT Cartridge v1.1". In one account it states the -color just below and above the reference bar to be within one -shade of each other. +The "Atari 5200 Field Service Manual" provides two different +sets of instructions in harmony with utilizing the "PAM +Diagnostic SALT Cartridge v1.1". In one account it states the +color just below and above the reference bar to be within one +shade of each other. -Under the same reference document, directions are given for it -to be the same color. Phase Shift 25.7 degrees matches Hue 1x, +Under the same reference document, directions are given for it +to be the same color. Phase Shift 25.7 degrees matches Hue 1x, 15x and the color below the reference bar. -However, if the system is adjusted within the first several -minutes of running, the warm up, consistent system run time, -causes Hue 15x (F$) to become stronger/darker gold (More brown -then ultimately red-brown); as well as leans Hue 14x (E$) more -brown than green. Once achieving a phase shift of 27.7, -Hue 14x (E$) and Hue 15x (F$) near-exact match Hue 1x and 2x -respectively. +However, if the system is adjusted within the first several +minutes of running, the warm up, consistent system run time, +causes Hue 15x (F$) to become stronger/darker gold (More brown +then ultimately red-brown); as well as leans Hue 14x (E$) more +brown than green. Once achieving a phase shift of 27.7, +Hue 14x (E$) and Hue 15x (F$) near-exact match Hue 1x and 2x +respectively. -Accounting for system 'warm-up', phase shifting, as well as the -instructions for it to be within one shade of each other, would -make Phase Shift 26.2 degrees or 26.7 degrees a realistic +Accounting for system 'warm-up', phase shifting, as well as the +instructions for it to be within one shade of each other, would +make Phase Shift 26.2 degrees or 26.7 degrees a realistic logical choice. -It also collaborates with the official "GTIA C014805 NTSC" -document for color order: Hue 1x = Gold, Hue 2x = Orange, -Hue 15x (F$) = Light-Orange; Phase Shift 26.2 places -Hue 15x (F$) between Hue 1x, Gold and Hue 2x, Orange; -a Light Orange in color. Color descriptions are best measured -in the middle of the brightness scale. +It also collaborates with the official "GTIA C014805 NTSC" +document for color order: Hue 1x = Gold, Hue 2x = Orange, +Hue 15x (F$) = Light-Orange; Phase Shift 26.2 places +Hue 15x (F$) between Hue 1x, Gold and Hue 2x, Orange; +a Light Orange in color. Color descriptions are best measured +in the middle of the brightness scale. -It should be mentioned that Green-Yellow is referenced at -Hue 13x (D$), nowhere near Hue 1x. A Green-Yellow Hue 1x is -how the palette is manipulated and modified (in part) under +It should be mentioned that Green-Yellow is referenced at +Hue 13x (D$), nowhere near Hue 1x. A Green-Yellow Hue 1x is +how the palette is manipulated and modified (in part) under a modern flat panel display. -Note though, even a properly calibrated console, at power on, -the phase shift appears as low as ~23 degrees and after a -considerable consistent runtime, can be as high as ~28 degrees. -In general, the low end of ~23 degrees lasts for maybe several -seconds, whereas higher values such as ~25-27 degrees is the -most dominant during system run time. +Note though, even a properly calibrated console, at power on, +the phase shift appears as low as ~23 degrees and after a +considerable consistent runtime, can be as high as ~28 degrees. +In general, the low end of ~23 degrees lasts for maybe several +seconds, whereas higher values such as ~25-27 degrees is the +most dominant during system run time. -Additionally, the blue to red (And consequently blue to green) -ratio proportions may appear different on a modern flat panel -display than a CRT in some instances for the Atari 5200 system. -Furthermore, you may have some variation of proportions even +Additionally, the blue to red (And consequently blue to green) +ratio proportions may appear different on a modern flat panel +display than a CRT in some instances for the Atari 5200 system. +Furthermore, you may have some variation of proportions even within the same display type. - -One side effect of this on the console's palette is that some -values of red may appear too pinkish - Too much blue to red. -This is not the same as a traditional tint-hue control -adjustment; rather, can be demonstrated by changing the blue + +One side effect of this on the console's palette is that some +values of red may appear too pinkish - Too much blue to red. +This is not the same as a traditional tint-hue control +adjustment; rather, can be demonstrated by changing the blue ratio values via MESS HLSL settings. -Lastly, the Atari 2600 & 7800 NTSC color palettes hold the same -hue structure order and have similar appearance differences +Lastly, the Atari 2600 & 7800 NTSC color palettes hold the same +hue structure order and have similar appearance differences dependent upon display type. ***************************************************************/ /************************************************************** @@ -832,84 +832,84 @@ dependent upon display type. static const UINT8 atari_palette[256*3] = { /* Grey */ - 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, - 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, - 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, - 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, + 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, + 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, + 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, + 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, /* Gold */ - 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, - 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, - 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, + 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, + 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, + 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, /* Orange */ - 0x31,0x00,0x00, 0x42,0x06,0x00, 0x53,0x17,0x00, 0x64,0x28,0x00, - 0x75,0x39,0x00, 0x86,0X4A,0x00, 0x97,0x5B,0x0B, 0xA8,0x6C,0x1C, - 0xB9,0x7D,0x2D, 0xCA,0x8E,0x3E, 0xDB,0x9F,0x4F, 0xEC,0xB0,0x60, - 0xFD,0xC1,0x71, 0xFF,0xD2,0x86, 0xFF,0xE3,0x9D, 0xFF,0xF4,0xB3, + 0x31,0x00,0x00, 0x42,0x06,0x00, 0x53,0x17,0x00, 0x64,0x28,0x00, + 0x75,0x39,0x00, 0x86,0X4A,0x00, 0x97,0x5B,0x0B, 0xA8,0x6C,0x1C, + 0xB9,0x7D,0x2D, 0xCA,0x8E,0x3E, 0xDB,0x9F,0x4F, 0xEC,0xB0,0x60, + 0xFD,0xC1,0x71, 0xFF,0xD2,0x86, 0xFF,0xE3,0x9D, 0xFF,0xF4,0xB3, /* Red-Orange */ - 0x3E,0x00,0x00, 0x4F,0x00,0x00, 0x60,0x08,0x00, 0x71,0x19,0x00, - 0x82,0x2A,0x0F, 0x93,0x3B,0x20, 0xA4,0x4C,0x31, 0xB5,0x5D,0x42, - 0xC6,0x6E,0x53, 0xD7,0x7F,0x64, 0xE8,0x90,0x75, 0xF9,0xA1,0x86, + 0x3E,0x00,0x00, 0x4F,0x00,0x00, 0x60,0x08,0x00, 0x71,0x19,0x00, + 0x82,0x2A,0x0F, 0x93,0x3B,0x20, 0xA4,0x4C,0x31, 0xB5,0x5D,0x42, + 0xC6,0x6E,0x53, 0xD7,0x7F,0x64, 0xE8,0x90,0x75, 0xF9,0xA1,0x86, 0xFF,0xB2,0x9A, 0xFF,0xC3,0xB0, 0xFF,0xD4,0xC6, 0xFF,0xE5,0xDC, /* Pink */ - 0x3E,0x00,0x06, 0x4F,0x00,0x12, 0x60,0x00,0x1E, 0x71,0x0E,0x2E, - 0x82,0x1F,0x3F, 0x93,0x30,0x50, 0xA4,0x41,0x61, 0xB5,0x52,0x72, - 0xC6,0x63,0x83, 0xD7,0x74,0x94, 0xE8,0x85,0xA5, 0xF9,0x96,0xB6, + 0x3E,0x00,0x06, 0x4F,0x00,0x12, 0x60,0x00,0x1E, 0x71,0x0E,0x2E, + 0x82,0x1F,0x3F, 0x93,0x30,0x50, 0xA4,0x41,0x61, 0xB5,0x52,0x72, + 0xC6,0x63,0x83, 0xD7,0x74,0x94, 0xE8,0x85,0xA5, 0xF9,0x96,0xB6, 0xFF,0xA7,0xCB, 0xFF,0xB8,0xE1, 0xFF,0xC9,0xEF, 0xFF,0xDA,0xF4, /* Purple */ - 0x32,0x00,0x38, 0x43,0x00,0x44, 0x54,0x00,0x50, 0x65,0x0C,0x5F, - 0x76,0x1D,0x70, 0x87,0x2E,0x81, 0x98,0x3F,0x92, 0xA9,0x50,0xA3, - 0xBA,0x61,0xB4, 0xCB,0x72,0xC5, 0xDC,0x83,0xD6, 0xED,0x94,0xE4, + 0x32,0x00,0x38, 0x43,0x00,0x44, 0x54,0x00,0x50, 0x65,0x0C,0x5F, + 0x76,0x1D,0x70, 0x87,0x2E,0x81, 0x98,0x3F,0x92, 0xA9,0x50,0xA3, + 0xBA,0x61,0xB4, 0xCB,0x72,0xC5, 0xDC,0x83,0xD6, 0xED,0x94,0xE4, 0xFE,0xA5,0xE4, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, /* Purple-Blue */ - 0x1B,0x00,0x5F, 0x2C,0x00,0x6B, 0x3D,0x00,0x77, 0x4E,0x11,0x88, - 0x5F,0x22,0x99, 0x70,0x33,0xAA, 0x81,0x44,0xBB, 0x92,0x55,0xCC, - 0xA3,0x66,0xDD, 0xB4,0x77,0xED, 0xC5,0x88,0xED, 0xD6,0x99,0xED, + 0x1B,0x00,0x5F, 0x2C,0x00,0x6B, 0x3D,0x00,0x77, 0x4E,0x11,0x88, + 0x5F,0x22,0x99, 0x70,0x33,0xAA, 0x81,0x44,0xBB, 0x92,0x55,0xCC, + 0xA3,0x66,0xDD, 0xB4,0x77,0xED, 0xC5,0x88,0xED, 0xD6,0x99,0xED, 0xE7,0xAA,0xED, 0xF8,0xBB,0xED, 0xFF,0xCC,0xF0, 0xFF,0xDD,0xF5, /* Blue 1 */ - 0x00,0x00,0x72, 0x10,0x00,0x7E, 0x21,0x0D,0x8E, 0x32,0x1E,0x9F, - 0x43,0x2F,0xB0, 0x54,0x40,0xC1, 0x65,0x51,0xD2, 0x76,0x62,0xE3, - 0x87,0x73,0xF4, 0x98,0x84,0xF9, 0xA9,0x95,0xF9, 0xBA,0xA6,0xF9, + 0x00,0x00,0x72, 0x10,0x00,0x7E, 0x21,0x0D,0x8E, 0x32,0x1E,0x9F, + 0x43,0x2F,0xB0, 0x54,0x40,0xC1, 0x65,0x51,0xD2, 0x76,0x62,0xE3, + 0x87,0x73,0xF4, 0x98,0x84,0xF9, 0xA9,0x95,0xF9, 0xBA,0xA6,0xF9, 0xCB,0xB7,0xF9, 0xDC,0xC8,0xF9, 0xED,0xD9,0xF9, 0xFE,0xEA,0xF9, /* Blue 2 */ - 0x00,0x00,0x65, 0x00,0x0C,0x7A, 0x05,0x1D,0x8E, 0x16,0x2E,0x9F, - 0x27,0x3F,0xB0, 0x38,0x50,0xC1, 0x49,0x61,0xD2, 0x5A,0x72,0xE3, - 0x6B,0x83,0xF4, 0x7C,0x94,0xFF, 0x8D,0xA5,0xFF, 0x9E,0xB6,0xFF, + 0x00,0x00,0x65, 0x00,0x0C,0x7A, 0x05,0x1D,0x8E, 0x16,0x2E,0x9F, + 0x27,0x3F,0xB0, 0x38,0x50,0xC1, 0x49,0x61,0xD2, 0x5A,0x72,0xE3, + 0x6B,0x83,0xF4, 0x7C,0x94,0xFF, 0x8D,0xA5,0xFF, 0x9E,0xB6,0xFF, 0xAF,0xC7,0xFF, 0xC0,0xD8,0xFF, 0xD1,0xE9,0xFF, 0xE2,0xFA,0xFF, /* Light-Blue */ - 0x00,0x0D,0x48, 0x00,0x1E,0x5E, 0x00,0x2F,0x74, 0x00,0x40,0x8A, - 0x11,0x51,0x9B, 0x22,0x62,0xAC, 0x33,0x73,0xBD, 0x44,0x84,0xCE, - 0x55,0x95,0xDF, 0x66,0xA6,0xF0, 0x77,0xB7,0xFF, 0x88,0xC8,0xFF, + 0x00,0x0D,0x48, 0x00,0x1E,0x5E, 0x00,0x2F,0x74, 0x00,0x40,0x8A, + 0x11,0x51,0x9B, 0x22,0x62,0xAC, 0x33,0x73,0xBD, 0x44,0x84,0xCE, + 0x55,0x95,0xDF, 0x66,0xA6,0xF0, 0x77,0xB7,0xFF, 0x88,0xC8,0xFF, 0x99,0xD9,0xFF, 0xAA,0xEA,0xFF, 0xBB,0xFB,0xFF, 0xCC,0xFF,0xFF, /* Turquoise */ - 0x00,0x1C,0x1C, 0x00,0x2D,0x32, 0x00,0x3E,0x49, 0x00,0x4F,0x5F, - 0x05,0x60,0x73, 0x16,0x71,0x84, 0x27,0x82,0x95, 0x38,0x93,0xA6, - 0x49,0xA4,0xB7, 0x5A,0xB5,0xC8, 0x6B,0xC6,0xD9, 0x7C,0xD7,0xEA, + 0x00,0x1C,0x1C, 0x00,0x2D,0x32, 0x00,0x3E,0x49, 0x00,0x4F,0x5F, + 0x05,0x60,0x73, 0x16,0x71,0x84, 0x27,0x82,0x95, 0x38,0x93,0xA6, + 0x49,0xA4,0xB7, 0x5A,0xB5,0xC8, 0x6B,0xC6,0xD9, 0x7C,0xD7,0xEA, 0x8D,0xE8,0xFB, 0x9E,0xF9,0xFF, 0xAF,0xFF,0xFF, 0xC0,0xFF,0xFF, /* Green-Blue */ - 0x00,0x25,0x0B, 0x00,0x36,0x10, 0x00,0x47,0x18, 0x00,0x58,0x2E, - 0x07,0x69,0x42, 0x18,0x7A,0x53, 0x29,0x8B,0x64, 0x3A,0x9C,0x75, - 0x4B,0xAD,0x86, 0x5C,0xBE,0x97, 0x6D,0xCF,0xA8, 0x7E,0xE0,0xB9, + 0x00,0x25,0x0B, 0x00,0x36,0x10, 0x00,0x47,0x18, 0x00,0x58,0x2E, + 0x07,0x69,0x42, 0x18,0x7A,0x53, 0x29,0x8B,0x64, 0x3A,0x9C,0x75, + 0x4B,0xAD,0x86, 0x5C,0xBE,0x97, 0x6D,0xCF,0xA8, 0x7E,0xE0,0xB9, 0x8F,0xF1,0xCA, 0xA0,0xFF,0xDA, 0xB1,0xFF,0xE6, 0xC2,0xFF,0xF2, /* Green */ - 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x04,0x5A,0x1A, - 0x15,0x6B,0x1A, 0x26,0x7C,0x22, 0x37,0x8D,0x33, 0x48,0x9E,0x44, - 0x59,0xAF,0x55, 0x6A,0xC0,0x66, 0x7B,0xD1,0x77, 0x8C,0xE2,0x88, + 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x04,0x5A,0x1A, + 0x15,0x6B,0x1A, 0x26,0x7C,0x22, 0x37,0x8D,0x33, 0x48,0x9E,0x44, + 0x59,0xAF,0x55, 0x6A,0xC0,0x66, 0x7B,0xD1,0x77, 0x8C,0xE2,0x88, 0x9D,0xF3,0x99, 0xAE,0xFF,0xA8, 0xBF,0xFF,0xB4, 0xD0,0xFF,0xC0, /* Yellow-Green */ - 0x00,0x21,0x0A, 0x00,0x32,0x0F, 0x0A,0x43,0x11, 0x1B,0x54,0x11, - 0x2C,0x65,0x11, 0x3D,0x76,0x11, 0x4E,0x87,0x11, 0x5F,0x98,0x1E, - 0x70,0xA9,0x2F, 0x81,0xBA,0x40, 0x92,0xCB,0x51, 0xA3,0xDC,0x62, + 0x00,0x21,0x0A, 0x00,0x32,0x0F, 0x0A,0x43,0x11, 0x1B,0x54,0x11, + 0x2C,0x65,0x11, 0x3D,0x76,0x11, 0x4E,0x87,0x11, 0x5F,0x98,0x1E, + 0x70,0xA9,0x2F, 0x81,0xBA,0x40, 0x92,0xCB,0x51, 0xA3,0xDC,0x62, 0xB4,0xED,0x73, 0xC5,0xFE,0x84, 0xD6,0xFF,0x90, 0xE7,0xFF,0x9C, /* Orange-Green */ - 0x05,0x13,0x04, 0x16,0x24,0x04, 0x27,0x35,0x04, 0x38,0x46,0x04, - 0x49,0x57,0x04, 0x5A,0x68,0x04, 0x6B,0x79,0x04, 0x7C,0x8A,0x09, - 0x8D,0x9B,0x1A, 0x9E,0xAC,0x2B, 0xAF,0xBD,0x3C, 0xC0,0xCE,0x4D, + 0x05,0x13,0x04, 0x16,0x24,0x04, 0x27,0x35,0x04, 0x38,0x46,0x04, + 0x49,0x57,0x04, 0x5A,0x68,0x04, 0x6B,0x79,0x04, 0x7C,0x8A,0x09, + 0x8D,0x9B,0x1A, 0x9E,0xAC,0x2B, 0xAF,0xBD,0x3C, 0xC0,0xCE,0x4D, 0xD1,0xDF,0x5E, 0xE2,0xF0,0x6F, 0xF3,0xFF,0x80, 0xFF,0xFF,0x8D, /* Light-Orange */ - 0x21,0x02,0x00, 0x32,0x13,0x00, 0x43,0x24,0x00, 0x54,0x35,0x00, - 0x65,0x46,0x00, 0x76,0x57,0x00, 0x87,0x68,0x00, 0x98,0x79,0x0C, - 0xA9,0x8A,0x1D, 0xBA,0x9B,0x2E, 0xCB,0xAC,0x3F, 0xDC,0xBD,0x50, + 0x21,0x02,0x00, 0x32,0x13,0x00, 0x43,0x24,0x00, 0x54,0x35,0x00, + 0x65,0x46,0x00, 0x76,0x57,0x00, 0x87,0x68,0x00, 0x98,0x79,0x0C, + 0xA9,0x8A,0x1D, 0xBA,0x9B,0x2E, 0xCB,0xAC,0x3F, 0xDC,0xBD,0x50, 0xED,0xCE,0x61, 0xFE,0xDF,0x72, 0xFF,0xF0,0x87, 0xFF,0xFF,0x9D }; @@ -928,399 +928,399 @@ void a400_state::palette_init() PALETTE - PHASE 24.7 SHIFT GREY - 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, - 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, - 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, - 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, + 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, + 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, + 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, + 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, GOLD - 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, - 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, - 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, - 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, + 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, + 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, + 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, + 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, ORANGE - 0x30,0x00,0x00, 0x41,0x07,0x00, 0x52,0x18,0x00, 0x63,0x29,0x00, - 0x74,0x3A,0x00, 0x85,0x4B,0x00, 0x96,0x5C,0x0A, 0xA7,0x6D,0x1B, - 0xB8,0x7E,0x2C, 0xC9,0x8F,0x3D, 0xDA,0xA0,0x4E, 0xEB,0xB1,0x5F, - 0xFC,0xC2,0x70, 0xFF,0xD3,0x85, 0xFF,0xE4,0x9B, 0xFF,0xF5,0xB1, + 0x30,0x00,0x00, 0x41,0x07,0x00, 0x52,0x18,0x00, 0x63,0x29,0x00, + 0x74,0x3A,0x00, 0x85,0x4B,0x00, 0x96,0x5C,0x0A, 0xA7,0x6D,0x1B, + 0xB8,0x7E,0x2C, 0xC9,0x8F,0x3D, 0xDA,0xA0,0x4E, 0xEB,0xB1,0x5F, + 0xFC,0xC2,0x70, 0xFF,0xD3,0x85, 0xFF,0xE4,0x9B, 0xFF,0xF5,0xB1, RED-ORANGE - 0x3D,0x00,0x00, 0x4E,0x00,0x00, 0x5F,0x09,0x00, 0x70,0x1A,0x00, - 0x81,0x2B,0x09, 0x92,0x3C,0x1A, 0xA3,0x4D,0x2B, 0xB4,0x5E,0x3C, - 0xC5,0x6F,0x4D, 0xD6,0x80,0x5E, 0xE7,0x91,0x6F, 0xF8,0xA2,0x80, - 0xFF,0xB3,0x94, 0xFF,0xC4,0xAA, 0xFF,0xD5,0xC0, 0xFF,0xE6,0xD6, + 0x3D,0x00,0x00, 0x4E,0x00,0x00, 0x5F,0x09,0x00, 0x70,0x1A,0x00, + 0x81,0x2B,0x09, 0x92,0x3C,0x1A, 0xA3,0x4D,0x2B, 0xB4,0x5E,0x3C, + 0xC5,0x6F,0x4D, 0xD6,0x80,0x5E, 0xE7,0x91,0x6F, 0xF8,0xA2,0x80, + 0xFF,0xB3,0x94, 0xFF,0xC4,0xAA, 0xFF,0xD5,0xC0, 0xFF,0xE6,0xD6, PINK - 0x3F,0x00,0x00, 0x50,0x00,0x09, 0x61,0x00,0x15, 0x72,0x10,0x26, - 0x83,0x21,0x37, 0x94,0x32,0x48, 0xA5,0x43,0x59, 0xB6,0x54,0x6A, - 0xC7,0x65,0x7B, 0xD8,0x76,0x8C, 0xE9,0x87,0x9D, 0xFA,0x98,0xAE, - 0xFF,0xA9,0xC2, 0xFF,0xBA,0xD8, 0xFF,0xCB,0xEE, 0xFF,0xDC,0xF4, + 0x3F,0x00,0x00, 0x50,0x00,0x09, 0x61,0x00,0x15, 0x72,0x10,0x26, + 0x83,0x21,0x37, 0x94,0x32,0x48, 0xA5,0x43,0x59, 0xB6,0x54,0x6A, + 0xC7,0x65,0x7B, 0xD8,0x76,0x8C, 0xE9,0x87,0x9D, 0xFA,0x98,0xAE, + 0xFF,0xA9,0xC2, 0xFF,0xBA,0xD8, 0xFF,0xCB,0xEE, 0xFF,0xDC,0xF4, PURPLE - 0x36,0x00,0x2E, 0x47,0x00,0x3A, 0x58,0x00,0x46, 0x69,0x0C,0x55, - 0x7A,0x1D,0x66, 0x8B,0x2E,0x77, 0x9C,0x3F,0x88, 0xAD,0x50,0x99, - 0xBE,0x61,0xAA, 0xCF,0x72,0xBB, 0xE0,0x83,0xCC, 0xF1,0x94,0xDD, - 0xFF,0xA5,0xE4, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, + 0x36,0x00,0x2E, 0x47,0x00,0x3A, 0x58,0x00,0x46, 0x69,0x0C,0x55, + 0x7A,0x1D,0x66, 0x8B,0x2E,0x77, 0x9C,0x3F,0x88, 0xAD,0x50,0x99, + 0xBE,0x61,0xAA, 0xCF,0x72,0xBB, 0xE0,0x83,0xCC, 0xF1,0x94,0xDD, + 0xFF,0xA5,0xE4, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, PURPLE-BLUE - 0x23,0x00,0x55, 0x34,0x00,0x61, 0x45,0x00,0x6D, 0x56,0x0F,0x7E, - 0x67,0x20,0x8F, 0x78,0x31,0xA0, 0x89,0x42,0xB1, 0x9A,0x53,0xC2, - 0xAB,0x64,0xD3, 0xBC,0x75,0xE4, 0xCD,0x86,0xEA, 0xDE,0x97,0xEA, - 0xEF,0xA8,0xEA, 0xFF,0xB9,0xEA, 0xFF,0xCA,0xEF, 0xFF,0xDB,0xF4, + 0x23,0x00,0x55, 0x34,0x00,0x61, 0x45,0x00,0x6D, 0x56,0x0F,0x7E, + 0x67,0x20,0x8F, 0x78,0x31,0xA0, 0x89,0x42,0xB1, 0x9A,0x53,0xC2, + 0xAB,0x64,0xD3, 0xBC,0x75,0xE4, 0xCD,0x86,0xEA, 0xDE,0x97,0xEA, + 0xEF,0xA8,0xEA, 0xFF,0xB9,0xEA, 0xFF,0xCA,0xEF, 0xFF,0xDB,0xF4, BLUE1 - 0x09,0x00,0x6E, 0x1A,0x00,0x7A, 0x2B,0x08,0x88, 0x3C,0x19,0x99, - 0x4D,0x2A,0xAA, 0x5E,0x3B,0xBB, 0x6F,0x4C,0xCC, 0x80,0x5D,0xDD, - 0x91,0x6E,0xEE, 0xA2,0x7F,0xF4, 0xB3,0x90,0xF4, 0xC4,0xA1,0xF4, - 0xD5,0xB2,0xF4, 0xE6,0xC3,0xF4, 0xF7,0xD4,0xF4, 0xFF,0xE5,0xF7, + 0x09,0x00,0x6E, 0x1A,0x00,0x7A, 0x2B,0x08,0x88, 0x3C,0x19,0x99, + 0x4D,0x2A,0xAA, 0x5E,0x3B,0xBB, 0x6F,0x4C,0xCC, 0x80,0x5D,0xDD, + 0x91,0x6E,0xEE, 0xA2,0x7F,0xF4, 0xB3,0x90,0xF4, 0xC4,0xA1,0xF4, + 0xD5,0xB2,0xF4, 0xE6,0xC3,0xF4, 0xF7,0xD4,0xF4, 0xFF,0xE5,0xF7, BLUE2 - 0x00,0x00,0x6D, 0x00,0x05,0x80, 0x10,0x16,0x91, 0x21,0x27,0xA2, - 0x32,0x38,0xB3, 0x43,0x49,0xC4, 0x54,0x5A,0xD5, 0x65,0x6B,0xE6, - 0x76,0x7C,0xF7, 0x87,0x8D,0xFF, 0x98,0x9E,0xFF, 0xA9,0xAF,0xFF, - 0xBA,0xC0,0xFF, 0xCB,0xD1,0xFF, 0xDC,0xE2,0xFF, 0xED,0xF3,0xFF + 0x00,0x00,0x6D, 0x00,0x05,0x80, 0x10,0x16,0x91, 0x21,0x27,0xA2, + 0x32,0x38,0xB3, 0x43,0x49,0xC4, 0x54,0x5A,0xD5, 0x65,0x6B,0xE6, + 0x76,0x7C,0xF7, 0x87,0x8D,0xFF, 0x98,0x9E,0xFF, 0xA9,0xAF,0xFF, + 0xBA,0xC0,0xFF, 0xCB,0xD1,0xFF, 0xDC,0xE2,0xFF, 0xED,0xF3,0xFF LIGHT-BLUE - 0x00,0x05,0x57, 0x00,0x16,0x6E, 0x00,0x27,0x84, 0x09,0x38,0x97, - 0x1A,0x49,0xA8, 0x2B,0x5A,0xB9, 0x3C,0x6B,0xCA, 0x4D,0x7C,0xDB, - 0x5E,0x8D,0xEC, 0x6F,0x9E,0xFD, 0x80,0xAF,0xFF, 0x91,0xC0,0xFF, - 0xA2,0xD1,0xFF, 0xB3,0xE2,0xFF, 0xC4,0xF3,0xFF, 0xD5,0xFF,0xFF, + 0x00,0x05,0x57, 0x00,0x16,0x6E, 0x00,0x27,0x84, 0x09,0x38,0x97, + 0x1A,0x49,0xA8, 0x2B,0x5A,0xB9, 0x3C,0x6B,0xCA, 0x4D,0x7C,0xDB, + 0x5E,0x8D,0xEC, 0x6F,0x9E,0xFD, 0x80,0xAF,0xFF, 0x91,0xC0,0xFF, + 0xA2,0xD1,0xFF, 0xB3,0xE2,0xFF, 0xC4,0xF3,0xFF, 0xD5,0xFF,0xFF, TURQUOISE - 0x00,0x15,0x34, 0x00,0x26,0x4A, 0x00,0x37,0x60, 0x00,0x48,0x77, - 0x0A,0x59,0x8A, 0x1B,0x6A,0x9B, 0x2C,0x7B,0xAC, 0x3D,0x8C,0xBD, - 0x4E,0x9D,0xCE, 0x5F,0xAE,0xDF, 0x70,0xBF,0xF0, 0x81,0xD0,0xFF, - 0x92,0xE1,0xFF, 0xA3,0xF2,0xFF, 0xB4,0xFF,0xFF, 0xC5,0xFF,0xFF + 0x00,0x15,0x34, 0x00,0x26,0x4A, 0x00,0x37,0x60, 0x00,0x48,0x77, + 0x0A,0x59,0x8A, 0x1B,0x6A,0x9B, 0x2C,0x7B,0xAC, 0x3D,0x8C,0xBD, + 0x4E,0x9D,0xCE, 0x5F,0xAE,0xDF, 0x70,0xBF,0xF0, 0x81,0xD0,0xFF, + 0x92,0xE1,0xFF, 0xA3,0xF2,0xFF, 0xB4,0xFF,0xFF, 0xC5,0xFF,0xFF GREEN-BLUE - 0x00,0x21,0x0A, 0x00,0x32,0x1F, 0x00,0x43,0x35, 0x00,0x54,0x4B, - 0x04,0x65,0x60, 0x15,0x76,0x71, 0x26,0x87,0x82, 0x37,0x98,0x93, - 0x48,0xA9,0xA4, 0x59,0xBA,0xB5, 0x6A,0xCB,0xC6, 0x7B,0xDC,0xD7, - 0x8C,0xED,0xE8, 0x9D,0xFE,0xF9, 0xAE,0xFF,0xFF, 0xBF,0xFF,0xFF, + 0x00,0x21,0x0A, 0x00,0x32,0x1F, 0x00,0x43,0x35, 0x00,0x54,0x4B, + 0x04,0x65,0x60, 0x15,0x76,0x71, 0x26,0x87,0x82, 0x37,0x98,0x93, + 0x48,0xA9,0xA4, 0x59,0xBA,0xB5, 0x6A,0xCB,0xC6, 0x7B,0xDC,0xD7, + 0x8C,0xED,0xE8, 0x9D,0xFE,0xF9, 0xAE,0xFF,0xFF, 0xBF,0xFF,0xFF, GREEN - 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1D, - 0x0A,0x6B,0x30, 0x1B,0x7C,0x41, 0x2C,0x8D,0x52, 0x3D,0x9E,0x63, - 0x4E,0xAF,0x74, 0x5F,0xC0,0x85, 0x70,0xD1,0x96, 0x81,0xE2,0xA7, - 0x92,0xF3,0xB8, 0xA3,0xFF,0xC8, 0xB4,0xFF,0xD3, 0xC5,0xFF,0xDF, + 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1D, + 0x0A,0x6B,0x30, 0x1B,0x7C,0x41, 0x2C,0x8D,0x52, 0x3D,0x9E,0x63, + 0x4E,0xAF,0x74, 0x5F,0xC0,0x85, 0x70,0xD1,0x96, 0x81,0xE2,0xA7, + 0x92,0xF3,0xB8, 0xA3,0xFF,0xC8, 0xB4,0xFF,0xD3, 0xC5,0xFF,0xDF, YELLOW-GREEN - 0x00,0x26,0x0B, 0x00,0x37,0x10, 0x00,0x48,0x16, 0x0A,0x59,0x18, - 0x1B,0x6A,0x18, 0x2C,0x7B,0x18, 0x3D,0x8C,0x27, 0x4E,0x9D,0x38, - 0x5F,0xAE,0x49, 0x70,0xBF,0x5A, 0x81,0xD0,0x6B, 0x92,0xE1,0x7C, - 0xA3,0xF2,0x8D, 0xB4,0xFF,0x9C, 0xC5,0xFF,0xA8, 0xD6,0xFF,0xB4, + 0x00,0x26,0x0B, 0x00,0x37,0x10, 0x00,0x48,0x16, 0x0A,0x59,0x18, + 0x1B,0x6A,0x18, 0x2C,0x7B,0x18, 0x3D,0x8C,0x27, 0x4E,0x9D,0x38, + 0x5F,0xAE,0x49, 0x70,0xBF,0x5A, 0x81,0xD0,0x6B, 0x92,0xE1,0x7C, + 0xA3,0xF2,0x8D, 0xB4,0xFF,0x9C, 0xC5,0xFF,0xA8, 0xD6,0xFF,0xB4, ORANGE-GREEN - 0x00,0x1E,0x09, 0x00,0x2F,0x0E, 0x11,0x40,0x0E, 0x22,0x51,0x0E, - 0x33,0x62,0x0E, 0x44,0x73,0x0E, 0x55,0x84,0x0E, 0x66,0x95,0x17, - 0x77,0xA6,0x28, 0x88,0xB7,0x39, 0x99,0xC8,0x4A, 0xAA,0xD9,0x5B, - 0xBB,0xEA,0x6C, 0xCC,0xFB,0x7D, 0xDD,0xFF,0x8A, 0xEE,0xFF,0x96, + 0x00,0x1E,0x09, 0x00,0x2F,0x0E, 0x11,0x40,0x0E, 0x22,0x51,0x0E, + 0x33,0x62,0x0E, 0x44,0x73,0x0E, 0x55,0x84,0x0E, 0x66,0x95,0x17, + 0x77,0xA6,0x28, 0x88,0xB7,0x39, 0x99,0xC8,0x4A, 0xAA,0xD9,0x5B, + 0xBB,0xEA,0x6C, 0xCC,0xFB,0x7D, 0xDD,0xFF,0x8A, 0xEE,0xFF,0x96, LIGHT-ORANGE - 0x0A,0x11,0x02, 0x1B,0x22,0x02, 0x2C,0x33,0x02, 0x3D,0x44,0x02, - 0x4E,0x55,0x02, 0x5F,0x66,0x02, 0x70,0x77,0x02, 0x81,0x88,0x09, - 0x92,0x99,0x1A, 0xA3,0xAA,0x2B, 0xB4,0xBB,0x3C, 0xC5,0xCC,0x4D, - 0xD6,0xDD,0x5E, 0xE7,0xEE,0x6F, 0xF8,0xFF,0x80, 0xFF,0xFF,0x8F, + 0x0A,0x11,0x02, 0x1B,0x22,0x02, 0x2C,0x33,0x02, 0x3D,0x44,0x02, + 0x4E,0x55,0x02, 0x5F,0x66,0x02, 0x70,0x77,0x02, 0x81,0x88,0x09, + 0x92,0x99,0x1A, 0xA3,0xAA,0x2B, 0xB4,0xBB,0x3C, 0xC5,0xCC,0x4D, + 0xD6,0xDD,0x5E, 0xE7,0xEE,0x6F, 0xF8,0xFF,0x80, 0xFF,0xFF,0x8F, ******************************************************************* ******************************************************************* PALETTE - PHASE 25.2 SHIFT GREY - 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, - 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, - 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, - 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, + 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, + 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, + 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, + 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, GOLD - 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, - 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, - 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, - 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, + 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, + 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, + 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, + 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, ORANGE - 0x30,0x00,0x00, 0x41,0x07,0x00, 0x52,0x18,0x00, 0x63,0x29,0x00, - 0x74,0x3A,0x00, 0x85,0x4B,0x00, 0x96,0x5C,0x0A, 0xA7,0x6D,0x1B, - 0xB8,0x7E,0x2C, 0xC9,0x8F,0x3D, 0xDA,0xA0,0x4E, 0xEB,0xB1,0x5F, - 0xFC,0xC2,0x70, 0xFF,0xD3,0x85, 0xFF,0xE4,0x9B, 0xFF,0xF5,0xB1, + 0x30,0x00,0x00, 0x41,0x07,0x00, 0x52,0x18,0x00, 0x63,0x29,0x00, + 0x74,0x3A,0x00, 0x85,0x4B,0x00, 0x96,0x5C,0x0A, 0xA7,0x6D,0x1B, + 0xB8,0x7E,0x2C, 0xC9,0x8F,0x3D, 0xDA,0xA0,0x4E, 0xEB,0xB1,0x5F, + 0xFC,0xC2,0x70, 0xFF,0xD3,0x85, 0xFF,0xE4,0x9B, 0xFF,0xF5,0xB1, RED-ORANGE - 0x3E,0x00,0x00, 0x4F,0x00,0x00, 0x60,0x09,0x00, 0x71,0x1A,0x00, - 0x82,0x2B,0x0B, 0x93,0x3C,0x1C, 0xA4,0x4D,0x2D, 0xB5,0x5E,0x3E, - 0xC6,0x6F,0x4F, 0xD7,0x80,0x60, 0xE8,0x91,0x71, 0xF9,0xA2,0x82, - 0xFF,0xB3,0x96, 0xFF,0xC4,0xAC, 0xFF,0xD5,0xC2, 0xFF,0xE6,0xD8, + 0x3E,0x00,0x00, 0x4F,0x00,0x00, 0x60,0x09,0x00, 0x71,0x1A,0x00, + 0x82,0x2B,0x0B, 0x93,0x3C,0x1C, 0xA4,0x4D,0x2D, 0xB5,0x5E,0x3E, + 0xC6,0x6F,0x4F, 0xD7,0x80,0x60, 0xE8,0x91,0x71, 0xF9,0xA2,0x82, + 0xFF,0xB3,0x96, 0xFF,0xC4,0xAC, 0xFF,0xD5,0xC2, 0xFF,0xE6,0xD8, PINK - 0x3F,0x00,0x00, 0x50,0x00,0x0C, 0x61,0x00,0x18, 0x72,0x0F,0x28, - 0x83,0x20,0x39, 0x94,0x31,0x4A, 0xA5,0x42,0x5B, 0xB6,0x53,0x6C, - 0xC7,0x64,0x7D, 0xD8,0x75,0x8E, 0xE9,0x86,0x9F, 0xFA,0x97,0xB0, - 0xFF,0xA8,0xC5, 0xFF,0xB9,0xDB, 0xFF,0xCA,0xEF, 0xFF,0xDB,0xF4, + 0x3F,0x00,0x00, 0x50,0x00,0x0C, 0x61,0x00,0x18, 0x72,0x0F,0x28, + 0x83,0x20,0x39, 0x94,0x31,0x4A, 0xA5,0x42,0x5B, 0xB6,0x53,0x6C, + 0xC7,0x64,0x7D, 0xD8,0x75,0x8E, 0xE9,0x86,0x9F, 0xFA,0x97,0xB0, + 0xFF,0xA8,0xC5, 0xFF,0xB9,0xDB, 0xFF,0xCA,0xEF, 0xFF,0xDB,0xF4, PURPLE - 0x35,0x00,0x31, 0x46,0x00,0x3D, 0x57,0x00,0x49, 0x68,0x0C,0x58, - 0x79,0x1D,0x69, 0x8A,0x2E,0x7A, 0x9B,0x3F,0x8B, 0xAC,0x50,0x9C, - 0xBD,0x61,0xAD, 0xCE,0x72,0xBE, 0xDF,0x83,0xCF, 0xF0,0x94,0xE0, - 0xFF,0xA5,0xE4, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, + 0x35,0x00,0x31, 0x46,0x00,0x3D, 0x57,0x00,0x49, 0x68,0x0C,0x58, + 0x79,0x1D,0x69, 0x8A,0x2E,0x7A, 0x9B,0x3F,0x8B, 0xAC,0x50,0x9C, + 0xBD,0x61,0xAD, 0xCE,0x72,0xBE, 0xDF,0x83,0xCF, 0xF0,0x94,0xE0, + 0xFF,0xA5,0xE4, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, PURPLE-BLUE - 0x20,0x00,0x59, 0x31,0x00,0x65, 0x42,0x00,0x71, 0x53,0x10,0x82, - 0x64,0x21,0x93, 0x75,0x32,0xA4, 0x86,0x43,0xB5, 0x97,0x54,0xC6, - 0xA8,0x65,0xD7, 0xB9,0x76,0xE8, 0xCA,0x87,0xEB, 0xDB,0x98,0xEB, - 0xEC,0xA9,0xEB, 0xFD,0xBA,0xEB, 0xFF,0xCB,0xEF, 0xFF,0xDC,0xF4, + 0x20,0x00,0x59, 0x31,0x00,0x65, 0x42,0x00,0x71, 0x53,0x10,0x82, + 0x64,0x21,0x93, 0x75,0x32,0xA4, 0x86,0x43,0xB5, 0x97,0x54,0xC6, + 0xA8,0x65,0xD7, 0xB9,0x76,0xE8, 0xCA,0x87,0xEB, 0xDB,0x98,0xEB, + 0xEC,0xA9,0xEB, 0xFD,0xBA,0xEB, 0xFF,0xCB,0xEF, 0xFF,0xDC,0xF4, BLUE1 - 0x05,0x00,0x70, 0x16,0x00,0x7C, 0x27,0x09,0x8B, 0x38,0x1A,0x9C, - 0x49,0x2B,0xAD, 0x5A,0x3C,0xBE, 0x6B,0x4D,0xCF, 0x7C,0x5E,0xE0, - 0X8D,0x6F,0xF1, 0x9E,0x80,0xF6, 0xAF,0x91,0xF6, 0xC0,0xA2,0xF6, - 0xD1,0xB3,0xF6, 0xE2,0xC4,0xF6, 0xF3,0xD5,0xF6, 0xFF,0xE6,0xF7, + 0x05,0x00,0x70, 0x16,0x00,0x7C, 0x27,0x09,0x8B, 0x38,0x1A,0x9C, + 0x49,0x2B,0xAD, 0x5A,0x3C,0xBE, 0x6B,0x4D,0xCF, 0x7C,0x5E,0xE0, + 0X8D,0x6F,0xF1, 0x9E,0x80,0xF6, 0xAF,0x91,0xF6, 0xC0,0xA2,0xF6, + 0xD1,0xB3,0xF6, 0xE2,0xC4,0xF6, 0xF3,0xD5,0xF6, 0xFF,0xE6,0xF7, BLUE2 - 0x00,0x00,0x6B, 0x00,0x08,0x7E, 0x0C,0x19,0x91, 0x1D,0x2A,0xA2, - 0x2E,0x3B,0xB3, 0x3F,0x4C,0xC4, 0x50,0x5D,0xD5, 0x61,0x6E,0xE6, - 0x72,0x7F,0xF7, 0x83,0x90,0xFF, 0x94,0xA1,0xFF, 0xA5,0xB2,0xFF, - 0xB6,0xC3,0xFF, 0xC7,0xD4,0xFF, 0xD8,0xE5,0xFF, 0xE9,0xF6,0xFF, + 0x00,0x00,0x6B, 0x00,0x08,0x7E, 0x0C,0x19,0x91, 0x1D,0x2A,0xA2, + 0x2E,0x3B,0xB3, 0x3F,0x4C,0xC4, 0x50,0x5D,0xD5, 0x61,0x6E,0xE6, + 0x72,0x7F,0xF7, 0x83,0x90,0xFF, 0x94,0xA1,0xFF, 0xA5,0xB2,0xFF, + 0xB6,0xC3,0xFF, 0xC7,0xD4,0xFF, 0xD8,0xE5,0xFF, 0xE9,0xF6,0xFF, LIGHT-BLUE - 0x00,0x08,0x52, 0x00,0x19,0x68, 0x00,0x2A,0x7F, 0x05,0x3B,0x93, - 0x16,0x4C,0xA4, 0x27,0x5D,0xB5, 0x38,0x6E,0xC6, 0x49,0x7F,0xD7, - 0x5A,0x90,0xE8, 0x6B,0xA1,0xF9, 0x7C,0xB2,0xFF, 0x8D,0xC3,0xFF, - 0x9E,0xD4,0xFF, 0xAF,0xE5,0xFF, 0xC0,0xF6,0xFF, 0xD1,0xFF,0xFF, + 0x00,0x08,0x52, 0x00,0x19,0x68, 0x00,0x2A,0x7F, 0x05,0x3B,0x93, + 0x16,0x4C,0xA4, 0x27,0x5D,0xB5, 0x38,0x6E,0xC6, 0x49,0x7F,0xD7, + 0x5A,0x90,0xE8, 0x6B,0xA1,0xF9, 0x7C,0xB2,0xFF, 0x8D,0xC3,0xFF, + 0x9E,0xD4,0xFF, 0xAF,0xE5,0xFF, 0xC0,0xF6,0xFF, 0xD1,0xFF,0xFF, TURQUOISE - 0x00,0x17,0x2D, 0x00,0x28,0x43, 0x00,0x39,0x59, 0x00,0x4A,0x6F, - 0x08,0x5B,0x83, 0x19,0x6C,0x94, 0x2A,0x7D,0xA5, 0x3B,0x8E,0xB6, - 0x4C,0x9F,0xC7, 0x5D,0xB0,0xD8, 0x6E,0xC1,0xE9, 0x7F,0xD2,0xFA, - 0x90,0xE3,0xFF, 0xA1,0xF4,0xFF, 0xB2,0xFF,0xFF, 0xC3,0xFF,0xFF, + 0x00,0x17,0x2D, 0x00,0x28,0x43, 0x00,0x39,0x59, 0x00,0x4A,0x6F, + 0x08,0x5B,0x83, 0x19,0x6C,0x94, 0x2A,0x7D,0xA5, 0x3B,0x8E,0xB6, + 0x4C,0x9F,0xC7, 0x5D,0xB0,0xD8, 0x6E,0xC1,0xE9, 0x7F,0xD2,0xFA, + 0x90,0xE3,0xFF, 0xA1,0xF4,0xFF, 0xB2,0xFF,0xFF, 0xC3,0xFF,0xFF, GREEN-BLUE - 0x00,0x23,0x0A, 0x00,0x34,0x15, 0x00,0x45,0x2B, 0x00,0x56,0x41, - 0x04,0x67,0x56, 0x15,0x78,0x67, 0x26,0x89,0x78, 0x37,0x9A,0x89, - 0x48,0xAB,0x9A, 0x59,0xBC,0xAB, 0x6A,0xCD,0xBC, 0x7B,0xDE,0xCD, - 0x8C,0xEF,0xDE, 0x9D,0xFF,0xEE, 0xAE,0xFF,0xFA, 0xBF,0xFF,0xFF, + 0x00,0x23,0x0A, 0x00,0x34,0x15, 0x00,0x45,0x2B, 0x00,0x56,0x41, + 0x04,0x67,0x56, 0x15,0x78,0x67, 0x26,0x89,0x78, 0x37,0x9A,0x89, + 0x48,0xAB,0x9A, 0x59,0xBC,0xAB, 0x6A,0xCD,0xBC, 0x7B,0xDE,0xCD, + 0x8C,0xEF,0xDE, 0x9D,0xFF,0xEE, 0xAE,0xFF,0xFA, 0xBF,0xFF,0xFF, GREEN - 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1B, - 0x0D,0x6B,0x25, 0x1E,0x7C,0x36, 0x2F,0x8D,0x47, 0x40,0x9E,0x58, - 0x51,0xAF,0x69, 0x62,0xC0,0x7A, 0x73,0xD1,0x8B, 0x84,0xE2,0x9C, - 0x95,0xF3,0xAD, 0xA6,0xFF,0xBD, 0xB7,0xFF,0xC9, 0xC8,0xFF,0xD4, + 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1B, + 0x0D,0x6B,0x25, 0x1E,0x7C,0x36, 0x2F,0x8D,0x47, 0x40,0x9E,0x58, + 0x51,0xAF,0x69, 0x62,0xC0,0x7A, 0x73,0xD1,0x8B, 0x84,0xE2,0x9C, + 0x95,0xF3,0xAD, 0xA6,0xFF,0xBD, 0xB7,0xFF,0xC9, 0xC8,0xFF,0xD4, YELLOW-GREEN - 0x00,0x24,0x0B, 0x00,0x35,0x10, 0x00,0x46,0x15, 0x10,0x57,0x15, - 0x21,0x68,0x15, 0x32,0x79,0x15, 0x43,0x8A,0x1C, 0x54,0x9B,0x2D, - 0x65,0xAC,0x3E, 0x76,0xBD,0x4F, 0x87,0xCE,0x60, 0x98,0xDF,0x71, - 0xA9,0xF0,0x82, 0xBA,0xFF,0x93, 0xCB,0xFF,0x9F, 0xDC,0xFF,0xAA, + 0x00,0x24,0x0B, 0x00,0x35,0x10, 0x00,0x46,0x15, 0x10,0x57,0x15, + 0x21,0x68,0x15, 0x32,0x79,0x15, 0x43,0x8A,0x1C, 0x54,0x9B,0x2D, + 0x65,0xAC,0x3E, 0x76,0xBD,0x4F, 0x87,0xCE,0x60, 0x98,0xDF,0x71, + 0xA9,0xF0,0x82, 0xBA,0xFF,0x93, 0xCB,0xFF,0x9F, 0xDC,0xFF,0xAA, ORANGE-GREEN - 0x00,0x1B,0x08, 0x08,0x2C,0x0B, 0x19,0x3D,0x0B, 0x2A,0x4E,0x0B, - 0x3B,0x5F,0x0B, 0x4C,0x70,0x0B, 0x5D,0x81,0x0B, 0x6E,0x92,0x11, - 0x7F,0xA3,0x22, 0x90,0xB4,0x33, 0xA1,0xC5,0x44, 0xB2,0xD6,0x55, - 0xC3,0xE7,0x66, 0xD4,0xF8,0x77, 0xE5,0xFF,0x85, 0xF6,0xFF,0x91, + 0x00,0x1B,0x08, 0x08,0x2C,0x0B, 0x19,0x3D,0x0B, 0x2A,0x4E,0x0B, + 0x3B,0x5F,0x0B, 0x4C,0x70,0x0B, 0x5D,0x81,0x0B, 0x6E,0x92,0x11, + 0x7F,0xA3,0x22, 0x90,0xB4,0x33, 0xA1,0xC5,0x44, 0xB2,0xD6,0x55, + 0xC3,0xE7,0x66, 0xD4,0xF8,0x77, 0xE5,0xFF,0x85, 0xF6,0xFF,0x91, LIGHT-ORANGE - 0x12,0x0C,0x00, 0x23,0x1D,0x00, 0x34,0x2E,0x00, 0x45,0x3F,0x00, - 0x56,0x50,0x00, 0x67,0x61,0x00, 0x78,0x72,0x00, 0x89,0x83,0x08, - 0x9A,0x94,0x19, 0xAB,0xA5,0x2A, 0xBC,0xB6,0x3B, 0xCD,0xC7,0x4C, - 0xDE,0xD8,0x5D, 0xEF,0xE9,0x6E, 0xFF,0xFA,0x80, 0xFF,0xFF,0x92, + 0x12,0x0C,0x00, 0x23,0x1D,0x00, 0x34,0x2E,0x00, 0x45,0x3F,0x00, + 0x56,0x50,0x00, 0x67,0x61,0x00, 0x78,0x72,0x00, 0x89,0x83,0x08, + 0x9A,0x94,0x19, 0xAB,0xA5,0x2A, 0xBC,0xB6,0x3B, 0xCD,0xC7,0x4C, + 0xDE,0xD8,0x5D, 0xEF,0xE9,0x6E, 0xFF,0xFA,0x80, 0xFF,0xFF,0x92, ******************************************************************* ******************************************************************* PALETTE - PHASE 25.7 SHIFT GREY - 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, - 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, - 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, - 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, + 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, + 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, + 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, + 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, GOLD - 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, - 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, - 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, - 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, + 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, + 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, + 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, + 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, ORANGE - 0x31,0x00,0x00, 0x42,0x06,0x00, 0x53,0x17,0x00, 0x64,0x28,0x00, - 0x75,0x39,0x00, 0x86,0X4A,0x00, 0x97,0x5B,0x0A, 0xA8,0x6C,0x1B, - 0xB9,0x7D,0x2C, 0xCA,0x8E,0x3D, 0xDB,0x9F,0x4E, 0xEC,0xB0,0x5F, - 0xFD,0xC1,0x70, 0xFF,0xD2,0x85, 0xFF,0xE3,0x9C, 0xFF,0xF4,0xB2, + 0x31,0x00,0x00, 0x42,0x06,0x00, 0x53,0x17,0x00, 0x64,0x28,0x00, + 0x75,0x39,0x00, 0x86,0X4A,0x00, 0x97,0x5B,0x0A, 0xA8,0x6C,0x1B, + 0xB9,0x7D,0x2C, 0xCA,0x8E,0x3D, 0xDB,0x9F,0x4E, 0xEC,0xB0,0x5F, + 0xFD,0xC1,0x70, 0xFF,0xD2,0x85, 0xFF,0xE3,0x9C, 0xFF,0xF4,0xB2, RED-ORANGE - 0x3E,0x00,0x00, 0x4F,0x00,0x00, 0x60,0x08,0x00, 0x71,0x19,0x00, - 0x82,0x2A,0x0D, 0x93,0x3B,0x1E, 0xA4,0x4C,0x2F, 0xB5,0x5D,0x40, - 0xC6,0x6E,0x51, 0xD7,0x7F,0x62, 0xE8,0x90,0x73, 0xF9,0xA1,0x83, - 0xFF,0xB2,0x98, 0xFF,0xC3,0xAE, 0xFF,0xD4,0xC4, 0xFF,0xE5,0xDA, + 0x3E,0x00,0x00, 0x4F,0x00,0x00, 0x60,0x08,0x00, 0x71,0x19,0x00, + 0x82,0x2A,0x0D, 0x93,0x3B,0x1E, 0xA4,0x4C,0x2F, 0xB5,0x5D,0x40, + 0xC6,0x6E,0x51, 0xD7,0x7F,0x62, 0xE8,0x90,0x73, 0xF9,0xA1,0x83, + 0xFF,0xB2,0x98, 0xFF,0xC3,0xAE, 0xFF,0xD4,0xC4, 0xFF,0xE5,0xDA, PINK - 0x3F,0x00,0x03, 0x50,0x00,0x0F, 0x61,0x00,0x1B, 0x72,0x0F,0x2B, - 0x83,0x20,0x3C, 0x94,0x31,0x4D, 0xA5,0x42,0x5E, 0xB6,0x53,0x6F, - 0xC7,0x64,0x80, 0xD8,0x75,0x91, 0xE9,0x86,0xA2, 0xFA,0x97,0xB3, - 0xFF,0xA8,0xC8, 0xFF,0xB9,0xDE, 0xFF,0xCA,0xEF, 0xFF,0xDB,0xF4, + 0x3F,0x00,0x03, 0x50,0x00,0x0F, 0x61,0x00,0x1B, 0x72,0x0F,0x2B, + 0x83,0x20,0x3C, 0x94,0x31,0x4D, 0xA5,0x42,0x5E, 0xB6,0x53,0x6F, + 0xC7,0x64,0x80, 0xD8,0x75,0x91, 0xE9,0x86,0xA2, 0xFA,0x97,0xB3, + 0xFF,0xA8,0xC8, 0xFF,0xB9,0xDE, 0xFF,0xCA,0xEF, 0xFF,0xDB,0xF4, PURPLE - 0x33,0x00,0x35, 0x44,0x00,0x41, 0x55,0x00,0x4C, 0x66,0x0C,0x5C, - 0x77,0x1D,0x6D, 0x88,0x2E,0x7E, 0x99,0x3F,0x8F, 0xAA,0x50,0xA0, - 0xBB,0x61,0xB1, 0xCC,0x72,0xC2, 0xDD,0x83,0xD3, 0xEE,0x94,0xE4, - 0xFF,0xA5,0xE4, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, + 0x33,0x00,0x35, 0x44,0x00,0x41, 0x55,0x00,0x4C, 0x66,0x0C,0x5C, + 0x77,0x1D,0x6D, 0x88,0x2E,0x7E, 0x99,0x3F,0x8F, 0xAA,0x50,0xA0, + 0xBB,0x61,0xB1, 0xCC,0x72,0xC2, 0xDD,0x83,0xD3, 0xEE,0x94,0xE4, + 0xFF,0xA5,0xE4, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, PURPLE-BLUE - 0x1D,0x00,0x5C, 0x2E,0x00,0x68, 0x40,0x00,0x74, 0x51,0x10,0x84, - 0x62,0x21,0x95, 0x73,0x32,0xA6, 0x84,0x43,0xB7, 0x95,0x54,0xC8, - 0xA6,0x65,0xD9, 0xB7,0x76,0xEA, 0xC8,0x87,0xEB, 0xD9,0x98,0xEB, - 0xE9,0xA9,0xEC, 0xFB,0xBA,0xEB, 0xFF,0xCB,0xEF, 0xFF,0xDC,0xF4, + 0x1D,0x00,0x5C, 0x2E,0x00,0x68, 0x40,0x00,0x74, 0x51,0x10,0x84, + 0x62,0x21,0x95, 0x73,0x32,0xA6, 0x84,0x43,0xB7, 0x95,0x54,0xC8, + 0xA6,0x65,0xD9, 0xB7,0x76,0xEA, 0xC8,0x87,0xEB, 0xD9,0x98,0xEB, + 0xE9,0xA9,0xEC, 0xFB,0xBA,0xEB, 0xFF,0xCB,0xEF, 0xFF,0xDC,0xF4, BLUE1 - 0x02,0x00,0x71, 0x13,0x00,0x7D, 0x24,0x0B,0x8C, 0x35,0x1C,0x9D, - 0x46,0x2D,0xAE, 0x57,0x3E,0xBF, 0x68,0x4F,0xD0, 0x79,0x60,0xE1, - 0x8A,0x71,0xF2, 0x9B,0x82,0xF7, 0xAC,0x93,0xF7, 0xBD,0xA4,0xF7, - 0xCE,0xB5,0xF7, 0xDF,0xC6,0xF7, 0xF0,0xD7,0xF7, 0xFF,0xE8,0xF8, + 0x02,0x00,0x71, 0x13,0x00,0x7D, 0x24,0x0B,0x8C, 0x35,0x1C,0x9D, + 0x46,0x2D,0xAE, 0x57,0x3E,0xBF, 0x68,0x4F,0xD0, 0x79,0x60,0xE1, + 0x8A,0x71,0xF2, 0x9B,0x82,0xF7, 0xAC,0x93,0xF7, 0xBD,0xA4,0xF7, + 0xCE,0xB5,0xF7, 0xDF,0xC6,0xF7, 0xF0,0xD7,0xF7, 0xFF,0xE8,0xF8, BLUE2 - 0x00,0x00,0x68, 0x00,0x0A,0x7C, 0x08,0x1B,0x90, 0x19,0x2C,0xA1, - 0x2A,0x3D,0xB2, 0x3B,0x4E,0xC3, 0x4C,0x5F,0xD4, 0x5D,0x70,0xE5, - 0x6E,0x81,0xF6, 0x7F,0x92,0xFF, 0x90,0xA3,0xFF, 0xA1,0xB4,0xFF, - 0xB2,0xC5,0xFF, 0xC3,0xD6,0xFF, 0xD4,0xE7,0xFF, 0xE5,0xF8,0xFF, + 0x00,0x00,0x68, 0x00,0x0A,0x7C, 0x08,0x1B,0x90, 0x19,0x2C,0xA1, + 0x2A,0x3D,0xB2, 0x3B,0x4E,0xC3, 0x4C,0x5F,0xD4, 0x5D,0x70,0xE5, + 0x6E,0x81,0xF6, 0x7F,0x92,0xFF, 0x90,0xA3,0xFF, 0xA1,0xB4,0xFF, + 0xB2,0xC5,0xFF, 0xC3,0xD6,0xFF, 0xD4,0xE7,0xFF, 0xE5,0xF8,0xFF, LIGHT-BLUE - 0x00,0x0A,0x4D, 0x00,0x1B,0x63, 0x00,0x2C,0x79, 0x02,0x3D,0x8F, - 0x13,0x4E,0xA0, 0x24,0x5F,0xB1, 0x35,0x70,0xC2, 0x46,0x81,0xD3, - 0x57,0x92,0xE4, 0x68,0xA3,0xF5, 0x79,0xB4,0xFF, 0x8A,0xC5,0xFF, - 0x9B,0xD6,0xFF, 0xAC,0xE7,0xFF, 0xBD,0xF8,0xFF, 0xCE,0xFF,0xFF, + 0x00,0x0A,0x4D, 0x00,0x1B,0x63, 0x00,0x2C,0x79, 0x02,0x3D,0x8F, + 0x13,0x4E,0xA0, 0x24,0x5F,0xB1, 0x35,0x70,0xC2, 0x46,0x81,0xD3, + 0x57,0x92,0xE4, 0x68,0xA3,0xF5, 0x79,0xB4,0xFF, 0x8A,0xC5,0xFF, + 0x9B,0xD6,0xFF, 0xAC,0xE7,0xFF, 0xBD,0xF8,0xFF, 0xCE,0xFF,0xFF, TURQUOISE - 0x00,0x1A,0x26, 0x00,0x2B,0x3C, 0x00,0x3C,0x52, 0x00,0x4D,0x68, - 0x06,0x5E,0x7C, 0x17,0x6F,0x8D, 0x28,0x80,0x9E, 0x39,0x91,0xAF, - 0x4A,0xA2,0xC0, 0x5B,0xB3,0xD1, 0x6C,0xC4,0xE2, 0x7D,0xD5,0xF3, - 0x8E,0xE6,0xFF, 0x9F,0xF7,0xFF, 0xB0,0xFF,0xFF, 0xC1,0xFF,0xFF, + 0x00,0x1A,0x26, 0x00,0x2B,0x3C, 0x00,0x3C,0x52, 0x00,0x4D,0x68, + 0x06,0x5E,0x7C, 0x17,0x6F,0x8D, 0x28,0x80,0x9E, 0x39,0x91,0xAF, + 0x4A,0xA2,0xC0, 0x5B,0xB3,0xD1, 0x6C,0xC4,0xE2, 0x7D,0xD5,0xF3, + 0x8E,0xE6,0xFF, 0x9F,0xF7,0xFF, 0xB0,0xFF,0xFF, 0xC1,0xFF,0xFF, GREEN-BLUE - 0x00,0x24,0x0B, 0x00,0x35,0x10, 0x00,0x46,0x22, 0x00,0x57,0x38, - 0x05,0x68,0x4D, 0x16,0x79,0x5E, 0x27,0x8A,0x6F, 0x38,0x9B,0x80, - 0x49,0xAC,0x91, 0x5A,0xBD,0xA2, 0x6B,0xCE,0xB3, 0x7C,0xDF,0xC4, - 0x8D,0xF0,0xD5, 0x9E,0xFF,0xE5, 0xAF,0xFF,0xF1, 0xC0,0xFF,0xFD, + 0x00,0x24,0x0B, 0x00,0x35,0x10, 0x00,0x46,0x22, 0x00,0x57,0x38, + 0x05,0x68,0x4D, 0x16,0x79,0x5E, 0x27,0x8A,0x6F, 0x38,0x9B,0x80, + 0x49,0xAC,0x91, 0x5A,0xBD,0xA2, 0x6B,0xCE,0xB3, 0x7C,0xDF,0xC4, + 0x8D,0xF0,0xD5, 0x9E,0xFF,0xE5, 0xAF,0xFF,0xF1, 0xC0,0xFF,0xFD, GREEN - 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1B, - 0x10,0x6B,0x1B, 0x21,0x7C,0x2C, 0x32,0x8D,0x3D, 0x43,0x9E,0x4E, - 0x54,0xAF,0x5F, 0x65,0xC0,0x70, 0x76,0xD1,0x81, 0x87,0xE2,0x92, - 0x98,0xF3,0xA3, 0xA9,0xFF,0xB3, 0xBA,0xFF,0xBF, 0xCB,0xFF,0xCB, + 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1B, + 0x10,0x6B,0x1B, 0x21,0x7C,0x2C, 0x32,0x8D,0x3D, 0x43,0x9E,0x4E, + 0x54,0xAF,0x5F, 0x65,0xC0,0x70, 0x76,0xD1,0x81, 0x87,0xE2,0x92, + 0x98,0xF3,0xA3, 0xA9,0xFF,0xB3, 0xBA,0xFF,0xBF, 0xCB,0xFF,0xCB, YELLOW-GREEN - 0x00,0x23,0x0A, 0x00,0x34,0x10, 0x04,0x45,0x13, 0x15,0x56,0x13, - 0x26,0x67,0x13, 0x37,0x78,0x13, 0x48,0x89,0x14, 0x59,0x9A,0x25, - 0x6A,0xAB,0x36, 0x7B,0xBC,0x47, 0x8C,0xCD,0x58, 0x9D,0xDE,0x69, - 0xAE,0xEF,0x7A, 0xBF,0xFF,0x8B, 0xD0,0xFF,0x97, 0xE1,0xFF,0xA3, + 0x00,0x23,0x0A, 0x00,0x34,0x10, 0x04,0x45,0x13, 0x15,0x56,0x13, + 0x26,0x67,0x13, 0x37,0x78,0x13, 0x48,0x89,0x14, 0x59,0x9A,0x25, + 0x6A,0xAB,0x36, 0x7B,0xBC,0x47, 0x8C,0xCD,0x58, 0x9D,0xDE,0x69, + 0xAE,0xEF,0x7A, 0xBF,0xFF,0x8B, 0xD0,0xFF,0x97, 0xE1,0xFF,0xA3, ORANGE-GREEN - 0x00,0x17,0x07, 0x0E,0x28,0x08, 0x1F,0x39,0x08, 0x30,0x4A,0x08, - 0x41,0x5B,0x08, 0x52,0x6C,0x08, 0x63,0x7D,0x08, 0x74,0x8E,0x0D, - 0x85,0x9F,0x1E, 0x96,0xB0,0x2F, 0xA7,0xC1,0x40, 0xB8,0xD2,0x51, - 0xC9,0xE3,0x62, 0xDA,0xF4,0x73, 0xEB,0xFF,0x82, 0xFC,0xFF,0x8E, + 0x00,0x17,0x07, 0x0E,0x28,0x08, 0x1F,0x39,0x08, 0x30,0x4A,0x08, + 0x41,0x5B,0x08, 0x52,0x6C,0x08, 0x63,0x7D,0x08, 0x74,0x8E,0x0D, + 0x85,0x9F,0x1E, 0x96,0xB0,0x2F, 0xA7,0xC1,0x40, 0xB8,0xD2,0x51, + 0xC9,0xE3,0x62, 0xDA,0xF4,0x73, 0xEB,0xFF,0x82, 0xFC,0xFF,0x8E, LIGHT-ORANGE - 0x19,0x07,0x00, 0x2A,0x18,0x00, 0x3B,0x29,0x00, 0x4C,0x3A,0x00, - 0x5D,0x4B,0x00, 0x6E,0x5C,0x00, 0x7F,0x6D,0x00, 0x90,0x7E,0x09, - 0xA1,0x8F,0x1A, 0xB2,0xA0,0x2B, 0xC3,0xB1,0x3C, 0xD4,0xC2,0x4D, - 0xE5,0xD3,0x5E, 0xF6,0xE4,0x6F, 0xFF,0xF5,0x82, 0xFF,0xFF,0x96, + 0x19,0x07,0x00, 0x2A,0x18,0x00, 0x3B,0x29,0x00, 0x4C,0x3A,0x00, + 0x5D,0x4B,0x00, 0x6E,0x5C,0x00, 0x7F,0x6D,0x00, 0x90,0x7E,0x09, + 0xA1,0x8F,0x1A, 0xB2,0xA0,0x2B, 0xC3,0xB1,0x3C, 0xD4,0xC2,0x4D, + 0xE5,0xD3,0x5E, 0xF6,0xE4,0x6F, 0xFF,0xF5,0x82, 0xFF,0xFF,0x96, ******************************************************************* ******************************************************************* PALETTE - PHASE 26.7 SHIFT GREY - 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, - 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, - 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, - 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, + 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, + 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, + 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, + 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, GOLD - 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, - 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, - 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, - 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xFF,0x97, + 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, + 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, + 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, + 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xFF,0x97, ORANGE - 0x32,0x00,0x00, 0x43,0x06,0x00, 0x54,0x17,0x00, 0x65,0x28,0x00, - 0x79,0x39,0x00, 0x87,0x4A,0x00, 0x98,0x5B,0x0C, 0xA9,0x6C,0x1D, - 0xBA,0x7D,0x2E, 0xCB,0x8E,0x3F, 0xDC,0x9F,0x50, 0xED,0xB0,0x61, - 0xFE,0xC1,0x72, 0xFF,0xD2,0x87, 0xFF,0xE3,0x9E, 0xFF,0xF4,0xB4, + 0x32,0x00,0x00, 0x43,0x06,0x00, 0x54,0x17,0x00, 0x65,0x28,0x00, + 0x79,0x39,0x00, 0x87,0x4A,0x00, 0x98,0x5B,0x0C, 0xA9,0x6C,0x1D, + 0xBA,0x7D,0x2E, 0xCB,0x8E,0x3F, 0xDC,0x9F,0x50, 0xED,0xB0,0x61, + 0xFE,0xC1,0x72, 0xFF,0xD2,0x87, 0xFF,0xE3,0x9E, 0xFF,0xF4,0xB4, RED-ORANGE - 0x3E,0x00,0x00, 0x4F,0x00,0x00, 0x60,0x07,0x00, 0x71,0x18,0x00, - 0x82,0x29,0x10, 0x93,0x3A,0x21, 0xA4,0x4B,0x32, 0xB5,0x5C,0x43, - 0xC6,0x6D,0x54, 0xD7,0x7E,0x65, 0xE8,0x8F,0x76, 0xF9,0xA0,0x87, - 0xFF,0xB1,0x9C, 0xFF,0xC2,0xB2, 0xFF,0xD3,0xC8, 0xFF,0xE4,0xDE, + 0x3E,0x00,0x00, 0x4F,0x00,0x00, 0x60,0x07,0x00, 0x71,0x18,0x00, + 0x82,0x29,0x10, 0x93,0x3A,0x21, 0xA4,0x4B,0x32, 0xB5,0x5C,0x43, + 0xC6,0x6D,0x54, 0xD7,0x7E,0x65, 0xE8,0x8F,0x76, 0xF9,0xA0,0x87, + 0xFF,0xB1,0x9C, 0xFF,0xC2,0xB2, 0xFF,0xD3,0xC8, 0xFF,0xE4,0xDE, PINK - 0x3E,0x00,0x09, 0x4F,0x00,0x15, 0x60,0x00,0x21, 0x71,0x0E,0x31, - 0x82,0x1F,0x42, 0x93,0x30,0x53, 0xA4,0x41,0x64, 0xB5,0x52,0x75, - 0xC6,0x63,0x86, 0xD7,0x74,0x97, 0xE8,0x85,0xA8, 0xF9,0x96,0xB9, - 0xFF,0xA7,0xCE, 0xFF,0xB8,0xE4, 0xFF,0xC9,0xEF, 0xFF,0xDA,0xF4, + 0x3E,0x00,0x09, 0x4F,0x00,0x15, 0x60,0x00,0x21, 0x71,0x0E,0x31, + 0x82,0x1F,0x42, 0x93,0x30,0x53, 0xA4,0x41,0x64, 0xB5,0x52,0x75, + 0xC6,0x63,0x86, 0xD7,0x74,0x97, 0xE8,0x85,0xA8, 0xF9,0x96,0xB9, + 0xFF,0xA7,0xCE, 0xFF,0xB8,0xE4, 0xFF,0xC9,0xEF, 0xFF,0xDA,0xF4, PURPLE - 0x30,0x00,0x3D, 0x41,0x00,0x48, 0x52,0x00,0x54, 0x63,0x0C,0x64, - 0x74,0x1D,0x75, 0x85,0x2E,0x86, 0x96,0x3F,0x97, 0xA7,0x50,0xA8, - 0xB8,0x61,0xB9, 0xC9,0x72,0xCA, 0xDA,0x83,0xDB, 0xEB,0x94,0xE5, - 0xFC,0xA5,0xE5, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, + 0x30,0x00,0x3D, 0x41,0x00,0x48, 0x52,0x00,0x54, 0x63,0x0C,0x64, + 0x74,0x1D,0x75, 0x85,0x2E,0x86, 0x96,0x3F,0x97, 0xA7,0x50,0xA8, + 0xB8,0x61,0xB9, 0xC9,0x72,0xCA, 0xDA,0x83,0xDB, 0xEB,0x94,0xE5, + 0xFC,0xA5,0xE5, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, PURPLE-BLUE - 0x18,0x00,0x62, 0x29,0x00,0x6E, 0x3A,0x01,0x7A, 0x4B,0x12,0x8B, - 0x5C,0x23,0x9C, 0x6D,0x34,0xAD, 0x7E,0x45,0xBE, 0x8F,0x56,0xCF, - 0xA0,0x67,0xE0, 0xB1,0x78,0xEE, 0xC2,0x89,0xEE, 0xD3,0x9A,0xEE, - 0xE4,0xAB,0xEE, 0xF5,0xBC,0xEE, 0xFF,0xCD,0xE0, 0xFF,0xDE,0xF5, + 0x18,0x00,0x62, 0x29,0x00,0x6E, 0x3A,0x01,0x7A, 0x4B,0x12,0x8B, + 0x5C,0x23,0x9C, 0x6D,0x34,0xAD, 0x7E,0x45,0xBE, 0x8F,0x56,0xCF, + 0xA0,0x67,0xE0, 0xB1,0x78,0xEE, 0xC2,0x89,0xEE, 0xD3,0x9A,0xEE, + 0xE4,0xAB,0xEE, 0xF5,0xBC,0xEE, 0xFF,0xCD,0xE0, 0xFF,0xDE,0xF5, BLUE1 - 0x00,0x00,0x72, 0x0C,0x00,0x7F, 0x1D,0x0E,0x8F, 0x2E,0x1F,0xA0, - 0x3F,0x30,0xB1, 0x50,0x41,0xC2, 0x61,0x52,0xD3, 0x72,0x63,0xE4, - 0x83,0x74,0xF5, 0x94,0x85,0xFA, 0xA5,0x96,0xFA, 0xB6,0xA7,0xFA, - 0xC7,0xB8,0xFA, 0xD8,0xC9,0xFA, 0xE9,0xDA,0xFA, 0xFA,0xE8,0xFA, + 0x00,0x00,0x72, 0x0C,0x00,0x7F, 0x1D,0x0E,0x8F, 0x2E,0x1F,0xA0, + 0x3F,0x30,0xB1, 0x50,0x41,0xC2, 0x61,0x52,0xD3, 0x72,0x63,0xE4, + 0x83,0x74,0xF5, 0x94,0x85,0xFA, 0xA5,0x96,0xFA, 0xB6,0xA7,0xFA, + 0xC7,0xB8,0xFA, 0xD8,0xC9,0xFA, 0xE9,0xDA,0xFA, 0xFA,0xE8,0xFA, BLUE2 - 0x00,0x00,0x62, 0x00,0x0F,0x77, 0x01,0x20,0x8D, 0x12,0x31,0x9E, - 0x23,0x42,0xAF, 0x34,0x53,0xC0, 0x45,0x64,0xD1, 0x56,0x75,0xE2, - 0x67,0x86,0xF3, 0x78,0x97,0xFF, 0x89,0xA8,0xFF, 0x9A,0xB9,0xFF, - 0xAB,0xCA,0xFF, 0xBC,0xDB,0xFF, 0xCD,0xEC,0xFF, 0xDE,0xFD,0xFF, + 0x00,0x00,0x62, 0x00,0x0F,0x77, 0x01,0x20,0x8D, 0x12,0x31,0x9E, + 0x23,0x42,0xAF, 0x34,0x53,0xC0, 0x45,0x64,0xD1, 0x56,0x75,0xE2, + 0x67,0x86,0xF3, 0x78,0x97,0xFF, 0x89,0xA8,0xFF, 0x9A,0xB9,0xFF, + 0xAB,0xCA,0xFF, 0xBC,0xDB,0xFF, 0xCD,0xEC,0xFF, 0xDE,0xFD,0xFF, LIGHT-BLUE - 0x00,0x10,0x42, 0x00,0x21,0x58, 0x00,0x32,0x6E, 0x00,0x43,0x84, - 0x0E,0x54,0x96, 0x1F,0x65,0xA7, 0x30,0x76,0xB8, 0x41,0x87,0xC9, - 0x52,0x98,0xDA, 0x63,0xA9,0xEB, 0x74,0xBA,0xFC, 0x85,0xCB,0xFF, - 0x96,0xDC,0xFF, 0xA7,0xED,0xFF, 0xB8,0xFE,0xFF, 0xC9,0xFF,0xFF, + 0x00,0x10,0x42, 0x00,0x21,0x58, 0x00,0x32,0x6E, 0x00,0x43,0x84, + 0x0E,0x54,0x96, 0x1F,0x65,0xA7, 0x30,0x76,0xB8, 0x41,0x87,0xC9, + 0x52,0x98,0xDA, 0x63,0xA9,0xEB, 0x74,0xBA,0xFC, 0x85,0xCB,0xFF, + 0x96,0xDC,0xFF, 0xA7,0xED,0xFF, 0xB8,0xFE,0xFF, 0xC9,0xFF,0xFF, TURQUOISE - 0x00,0x1E,0x14, 0x00,0x2F,0x2A, 0x00,0x40,0x40, 0x00,0x51,0x56, - 0x04,0x62,0x6B, 0x15,0x73,0x7C, 0x26,0x84,0x8D, 0x37,0x95,0x9E, - 0x48,0xA6,0xAF, 0x59,0xB7,0xC0, 0x6A,0xC8,0xD1, 0x7B,0xD9,0xE2, - 0x8C,0xEA,0xF3, 0x9D,0xFB,0xFF, 0xAE,0xFF,0xFF, 0xBF,0xFF,0xFF, + 0x00,0x1E,0x14, 0x00,0x2F,0x2A, 0x00,0x40,0x40, 0x00,0x51,0x56, + 0x04,0x62,0x6B, 0x15,0x73,0x7C, 0x26,0x84,0x8D, 0x37,0x95,0x9E, + 0x48,0xA6,0xAF, 0x59,0xB7,0xC0, 0x6A,0xC8,0xD1, 0x7B,0xD9,0xE2, + 0x8C,0xEA,0xF3, 0x9D,0xFB,0xFF, 0xAE,0xFF,0xFF, 0xBF,0xFF,0xFF, GREEN-BLUE - 0x00,0x26,0x0B, 0x00,0x37,0x10, 0x00,0x48,0x16, 0x00,0x59,0x25, - 0x08,0x6A,0x38, 0x19,0x7B,0x49, 0x2A,0x8C,0x5A, 0x3B,0x9D,0x6B, - 0x4C,0xAE,0x7C, 0x5D,0xBF,0x8D, 0x6E,0xD0,0x9E, 0x7F,0xE1,0xAF, - 0x90,0xF2,0xC0, 0xA1,0xFF,0xD0, 0xB2,0xFF,0xDC, 0xC3,0xFF,0xE8, + 0x00,0x26,0x0B, 0x00,0x37,0x10, 0x00,0x48,0x16, 0x00,0x59,0x25, + 0x08,0x6A,0x38, 0x19,0x7B,0x49, 0x2A,0x8C,0x5A, 0x3B,0x9D,0x6B, + 0x4C,0xAE,0x7C, 0x5D,0xBF,0x8D, 0x6E,0xD0,0x9E, 0x7F,0xE1,0xAF, + 0x90,0xF2,0xC0, 0xA1,0xFF,0xD0, 0xB2,0xFF,0xDC, 0xC3,0xFF,0xE8, GREEN - 0x00,0x26,0x0B, 0x00,0x37,0x10, 0x00,0x48,0x16, 0x08,0x59,0x18, - 0x19,0x6A,0x18, 0x2A,0x7B,0x18, 0x3B,0x8C,0x29, 0x4C,0x9D,0x3A, - 0x5D,0xAE,0x4B, 0x6E,0xBF,0x5C, 0x7F,0xD0,0x6D, 0x90,0xE1,0x7E, - 0xA1,0xF2,0x8F, 0xB2,0xFF,0x9F, 0xC3,0xFF,0xAB, 0xD4,0xFF,0xB7, + 0x00,0x26,0x0B, 0x00,0x37,0x10, 0x00,0x48,0x16, 0x08,0x59,0x18, + 0x19,0x6A,0x18, 0x2A,0x7B,0x18, 0x3B,0x8C,0x29, 0x4C,0x9D,0x3A, + 0x5D,0xAE,0x4B, 0x6E,0xBF,0x5C, 0x7F,0xD0,0x6D, 0x90,0xE1,0x7E, + 0xA1,0xF2,0x8F, 0xB2,0xFF,0x9F, 0xC3,0xFF,0xAB, 0xD4,0xFF,0xB7, YELLOW-GREEN - 0x00,0x1E,0x09, 0x00,0x2F,0x0E, 0x11,0x40,0x0E, 0x22,0x51,0x0E, - 0x33,0x62,0x0E, 0x44,0x73,0x0E, 0x55,0x84,0x0E, 0x66,0x95,0x17, - 0x77,0xA6,0x28, 0x88,0xB7,0x39, 0x99,0xC8,0x4A, 0xAA,0xD9,0x5B, - 0xBB,0xEA,0x6C, 0xCC,0xFB,0x7D, 0xDD,0xFF,0x8A, 0xEE,0xFF,0x96, + 0x00,0x1E,0x09, 0x00,0x2F,0x0E, 0x11,0x40,0x0E, 0x22,0x51,0x0E, + 0x33,0x62,0x0E, 0x44,0x73,0x0E, 0x55,0x84,0x0E, 0x66,0x95,0x17, + 0x77,0xA6,0x28, 0x88,0xB7,0x39, 0x99,0xC8,0x4A, 0xAA,0xD9,0x5B, + 0xBB,0xEA,0x6C, 0xCC,0xFB,0x7D, 0xDD,0xFF,0x8A, 0xEE,0xFF,0x96, ORANGE-GREEN - 0x0D,0x0F,0x01, 0x1E,0x20,0x01, 0x2F,0x31,0x01, 0x40,0x42,0x01, - 0x51,0x53,0x01, 0x62,0x64,0x01, 0x73,0x75,0x01, 0x84,0x86,0x08, - 0x95,0x97,0x19, 0xA6,0xA8,0x2A, 0xB7,0xB9,0x3B, 0xC8,0xCA,0x4C, - 0xD9,0xDB,0x5D, 0xEA,0xEC,0x6E, 0xFB,0xFD,0x7F, 0xFF,0xFF,0x8F, + 0x0D,0x0F,0x01, 0x1E,0x20,0x01, 0x2F,0x31,0x01, 0x40,0x42,0x01, + 0x51,0x53,0x01, 0x62,0x64,0x01, 0x73,0x75,0x01, 0x84,0x86,0x08, + 0x95,0x97,0x19, 0xA6,0xA8,0x2A, 0xB7,0xB9,0x3B, 0xC8,0xCA,0x4C, + 0xD9,0xDB,0x5D, 0xEA,0xEC,0x6E, 0xFB,0xFD,0x7F, 0xFF,0xFF,0x8F, LIGHT-ORANGE - 0x28,0x00,0x00, 0x39,0x0E,0x00, 0x4A,0x1F,0x00, 0x5B,0x30,0x00, - 0x6C,0x41,0x00, 0x7D,0x52,0x00, 0x8E,0x63,0x00, 0x9F,0x74,0x10, - 0xB0,0x85,0x21, 0xC1,0x96,0x32, 0xD2,0xA7,0x43, 0xE3,0xB8,0x54, - 0xF4,0xC9,0x65, 0xFF,0xDA,0x78, 0xFF,0xEB,0x8E, 0xFF,0xFC,0xA4, + 0x28,0x00,0x00, 0x39,0x0E,0x00, 0x4A,0x1F,0x00, 0x5B,0x30,0x00, + 0x6C,0x41,0x00, 0x7D,0x52,0x00, 0x8E,0x63,0x00, 0x9F,0x74,0x10, + 0xB0,0x85,0x21, 0xC1,0x96,0x32, 0xD2,0xA7,0x43, 0xE3,0xB8,0x54, + 0xF4,0xC9,0x65, 0xFF,0xDA,0x78, 0xFF,0xEB,0x8E, 0xFF,0xFC,0xA4, ******************************************************************* ******************************************************************* @@ -1328,200 +1328,200 @@ LIGHT-ORANGE GREY - 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, - 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, - 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, - 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, + 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, + 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, + 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, + 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, GOLD - 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, - 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, - 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, - 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, + 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, + 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, + 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, + 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xF7,0x97, ORANGE - 0x32,0x00,0x00, 0x43,0x05,0x00, 0x54,0x16,0x00, 0x65,0x27,0x00, - 0x76,0x38,0x00, 0x87,0X49,0x00, 0x98,0x5A,0x0C, 0xA9,0x6B,0x1D, - 0xBA,0x7C,0x2E, 0xCB,0x8D,0x3F, 0xDC,0x9E,0x50, 0xED,0xAF,0x61, - 0xFE,0xC0,0x72, 0xFF,0xD1,0x88, 0xFF,0xE2,0x9E, 0xFF,0xF3,0xB4, + 0x32,0x00,0x00, 0x43,0x05,0x00, 0x54,0x16,0x00, 0x65,0x27,0x00, + 0x76,0x38,0x00, 0x87,0X49,0x00, 0x98,0x5A,0x0C, 0xA9,0x6B,0x1D, + 0xBA,0x7C,0x2E, 0xCB,0x8D,0x3F, 0xDC,0x9E,0x50, 0xED,0xAF,0x61, + 0xFE,0xC0,0x72, 0xFF,0xD1,0x88, 0xFF,0xE2,0x9E, 0xFF,0xF3,0xB4, RED-ORANGE - 0x3F,0x00,0x00, 0x50,0x00,0x00, 0x61,0x07,0x00, 0x72,0x18,0x01, - 0x83,0x29,0x12, 0x94,0x3A,0x23, 0xA5,0x4B,0x34, 0xB6,0x5C,0x45, - 0xC7,0x6D,0x56, 0xD8,0x7E,0x67, 0xE9,0x8F,0x78, 0xFA,0xA0,0x89, - 0xFF,0xB1,0x9E, 0xFF,0xC2,0xB4, 0xFF,0xD3,0xCA, 0xFF,0xE4,0xE0, + 0x3F,0x00,0x00, 0x50,0x00,0x00, 0x61,0x07,0x00, 0x72,0x18,0x01, + 0x83,0x29,0x12, 0x94,0x3A,0x23, 0xA5,0x4B,0x34, 0xB6,0x5C,0x45, + 0xC7,0x6D,0x56, 0xD8,0x7E,0x67, 0xE9,0x8F,0x78, 0xFA,0xA0,0x89, + 0xFF,0xB1,0x9E, 0xFF,0xC2,0xB4, 0xFF,0xD3,0xCA, 0xFF,0xE4,0xE0, PINK - 0x3E,0x00,0x0C, 0x4F,0x00,0x18, 0x60,0x00,0x24, 0x71,0x0E,0x34, - 0x82,0x1F,0x45, 0x93,0x30,0x56, 0xA4,0x41,0x67, 0xB5,0x52,0x78, - 0xC6,0x63,0x89, 0xD7,0x74,0x9A, 0xE8,0x85,0xAB, 0xF9,0x96,0xB6, - 0xFF,0xA7,0xD1, 0xFF,0xB8,0xE7, 0xFF,0xC9,0xEF, 0xFF,0xDA,0xF4, + 0x3E,0x00,0x0C, 0x4F,0x00,0x18, 0x60,0x00,0x24, 0x71,0x0E,0x34, + 0x82,0x1F,0x45, 0x93,0x30,0x56, 0xA4,0x41,0x67, 0xB5,0x52,0x78, + 0xC6,0x63,0x89, 0xD7,0x74,0x9A, 0xE8,0x85,0xAB, 0xF9,0x96,0xB6, + 0xFF,0xA7,0xD1, 0xFF,0xB8,0xE7, 0xFF,0xC9,0xEF, 0xFF,0xDA,0xF4, PURPLE - 0x2F,0x00,0x3F, 0x40,0x00,0x4B, 0x51,0x00,0x57, 0x62,0x0C,0x66, - 0x73,0x1D,0x77, 0x84,0x2E,0x88, 0x95,0x3F,0x99, 0xA6,0x50,0xAA, - 0xB7,0x61,0xBB, 0xC8,0x72,0xCC, 0xD9,0x83,0xDD, 0xEA,0x94,0xE5, - 0xFB,0xA5,0xE5, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, + 0x2F,0x00,0x3F, 0x40,0x00,0x4B, 0x51,0x00,0x57, 0x62,0x0C,0x66, + 0x73,0x1D,0x77, 0x84,0x2E,0x88, 0x95,0x3F,0x99, 0xA6,0x50,0xAA, + 0xB7,0x61,0xBB, 0xC8,0x72,0xCC, 0xD9,0x83,0xDD, 0xEA,0x94,0xE5, + 0xFB,0xA5,0xE5, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, PURPLE-BLUE - 0x16,0x00,0x64, 0x27,0x00,0x70, 0x38,0x02,0x7D, 0x49,0x13,0x8E, - 0x5A,0x24,0x9F, 0x6B,0x35,0xB0, 0x7C,0x46,0xC1, 0x8D,0x57,0xD2, - 0x9E,0x68,0xE3, 0xAF,0x79,0xEF, 0xC0,0x8A,0xEF, 0xD1,0x9D,0xEF, - 0xE2,0xAC,0xEF, 0xF3,0xBD,0xEF, 0xFF,0xCE,0xF0, 0xFF,0xDF,0xF5, + 0x16,0x00,0x64, 0x27,0x00,0x70, 0x38,0x02,0x7D, 0x49,0x13,0x8E, + 0x5A,0x24,0x9F, 0x6B,0x35,0xB0, 0x7C,0x46,0xC1, 0x8D,0x57,0xD2, + 0x9E,0x68,0xE3, 0xAF,0x79,0xEF, 0xC0,0x8A,0xEF, 0xD1,0x9D,0xEF, + 0xE2,0xAC,0xEF, 0xF3,0xBD,0xEF, 0xFF,0xCE,0xF0, 0xFF,0xDF,0xF5, BLUE1 - 0x00,0x00,0x71, 0x09,0x00,0x7F, 0x1A,0x10,0x90, 0x2B,0x21,0xA1, - 0x3C,0x32,0xB2, 0x4D,0x43,0xC3, 0x5E,0x54,0xD4, 0x6F,0x65,0xE5, - 0x80,0x76,0xF6, 0x91,0x87,0xFC, 0xA2,0x98,0xFC, 0xB3,0xA9,0xFC, - 0xC4,0xBA,0xFC, 0xD5,0xCB,0xFC, 0xE6,0xDC,0xFC, 0xF7,0xED,0xFC, + 0x00,0x00,0x71, 0x09,0x00,0x7F, 0x1A,0x10,0x90, 0x2B,0x21,0xA1, + 0x3C,0x32,0xB2, 0x4D,0x43,0xC3, 0x5E,0x54,0xD4, 0x6F,0x65,0xE5, + 0x80,0x76,0xF6, 0x91,0x87,0xFC, 0xA2,0x98,0xFC, 0xB3,0xA9,0xFC, + 0xC4,0xBA,0xFC, 0xD5,0xCB,0xFC, 0xE6,0xDC,0xFC, 0xF7,0xED,0xFC, BLUE2 - 0x00,0x00,0x5E, 0x00,0x11,0x74, 0x00,0x22,0x8A, 0x0F,0x33,0x9C, - 0x20,0x44,0xAD, 0x31,0x55,0xBE, 0x42,0x66,0xCF, 0x53,0x77,0xE0, - 0x64,0x88,0xF1, 0x75,0x99,0xFF, 0x86,0xAA,0xFF, 0x97,0xBB,0xFF, - 0xA8,0xCC,0xFF, 0xB9,0xDD,0xFF, 0xCA,0xEE,0xFF, 0xDB,0xFF,0xFF, + 0x00,0x00,0x5E, 0x00,0x11,0x74, 0x00,0x22,0x8A, 0x0F,0x33,0x9C, + 0x20,0x44,0xAD, 0x31,0x55,0xBE, 0x42,0x66,0xCF, 0x53,0x77,0xE0, + 0x64,0x88,0xF1, 0x75,0x99,0xFF, 0x86,0xAA,0xFF, 0x97,0xBB,0xFF, + 0xA8,0xCC,0xFF, 0xB9,0xDD,0xFF, 0xCA,0xEE,0xFF, 0xDB,0xFF,0xFF, LIGHT-BLUE - 0x00,0x12,0x3B, 0x00,0x23,0x51, 0x00,0x34,0x68, 0x00,0x45,0x7E, - 0x0C,0x56,0x90, 0x1D,0x67,0xA1, 0x2E,0x78,0xB2, 0x3F,0x89,0xC3, - 0x50,0x9A,0xD4, 0x61,0xAB,0xE5, 0x72,0xBC,0xF6, 0x83,0xCD,0xFF, - 0x94,0xDE,0xFF, 0xA5,0xEF,0xFF, 0xB6,0xFF,0xFF, 0xC7,0xFF,0xFF, + 0x00,0x12,0x3B, 0x00,0x23,0x51, 0x00,0x34,0x68, 0x00,0x45,0x7E, + 0x0C,0x56,0x90, 0x1D,0x67,0xA1, 0x2E,0x78,0xB2, 0x3F,0x89,0xC3, + 0x50,0x9A,0xD4, 0x61,0xAB,0xE5, 0x72,0xBC,0xF6, 0x83,0xCD,0xFF, + 0x94,0xDE,0xFF, 0xA5,0xEF,0xFF, 0xB6,0xFF,0xFF, 0xC7,0xFF,0xFF, TURQUOISE - 0x00,0x20,0x0C, 0x00,0x31,0x22, 0x00,0x42,0x38, 0x00,0x53,0x4E, - 0x04,0x64,0x63, 0x15,0x75,0x74, 0x26,0x86,0x85, 0x37,0x97,0x96, - 0x48,0xA8,0xA7, 0x59,0xB9,0xB8, 0x6A,0xCA,0xC9, 0x7B,0xDB,0xDA, - 0x8C,0xEC,0xEB, 0x9D,0xFD,0xFC, 0xAE,0xFF,0xFF, 0xBF,0xFF,0xFF, + 0x00,0x20,0x0C, 0x00,0x31,0x22, 0x00,0x42,0x38, 0x00,0x53,0x4E, + 0x04,0x64,0x63, 0x15,0x75,0x74, 0x26,0x86,0x85, 0x37,0x97,0x96, + 0x48,0xA8,0xA7, 0x59,0xB9,0xB8, 0x6A,0xCA,0xC9, 0x7B,0xDB,0xDA, + 0x8C,0xEC,0xEB, 0x9D,0xFD,0xFC, 0xAE,0xFF,0xFF, 0xBF,0xFF,0xFF, GREEN-BLUE - 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1C, - 0x0B,0x6B,0x2F, 0x1C,0x7C,0x40, 0x2D,0x8D,0x51, 0x3E,0x9E,0x62, - 0x4F,0xAF,0x73, 0x60,0xC0,0x84, 0x71,0xD1,0x95, 0x82,0xE2,0xA6, - 0x93,0xF3,0xB7, 0xA4,0xFF,0xC6, 0xB5,0xFF,0xD2, 0xC6,0xFF,0xDE, + 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1C, + 0x0B,0x6B,0x2F, 0x1C,0x7C,0x40, 0x2D,0x8D,0x51, 0x3E,0x9E,0x62, + 0x4F,0xAF,0x73, 0x60,0xC0,0x84, 0x71,0xD1,0x95, 0x82,0xE2,0xA6, + 0x93,0xF3,0xB7, 0xA4,0xFF,0xC6, 0xB5,0xFF,0xD2, 0xC6,0xFF,0xDE, GREEN - 0x00,0x25,0x0B, 0x00,0x36,0x10, 0x00,0x47,0x15, 0x0D,0x58,0x16, - 0x1E,0x69,0x16, 0x2F,0x7A,0x16, 0x40,0x8B,0x21, 0x51,0x9C,0x32, - 0x62,0xAD,0x43, 0x73,0xBE,0x54, 0x84,0xCF,0x65, 0x95,0xE0,0x76, - 0xA6,0xF1,0x87, 0xB7,0xFF,0x98, 0xC8,0xFF,0xA3, 0xD9,0xFF,0xAF, + 0x00,0x25,0x0B, 0x00,0x36,0x10, 0x00,0x47,0x15, 0x0D,0x58,0x16, + 0x1E,0x69,0x16, 0x2F,0x7A,0x16, 0x40,0x8B,0x21, 0x51,0x9C,0x32, + 0x62,0xAD,0x43, 0x73,0xBE,0x54, 0x84,0xCF,0x65, 0x95,0xE0,0x76, + 0xA6,0xF1,0x87, 0xB7,0xFF,0x98, 0xC8,0xFF,0xA3, 0xD9,0xFF,0xAF, YELLOW-GREEN - 0x00,0x1B,0x08, 0x06,0x2C,0x0B, 0x17,0x3D,0x0B, 0x28,0x4E,0x0B, - 0x39,0x5F,0x0B, 0x4A,0x70,0x0B, 0x5B,0x81,0x0B, 0x6C,0x92,0x12, - 0x7D,0xA3,0x23, 0x8E,0xB4,0x34, 0x9F,0xC5,0x45, 0xB0,0xD6,0x56, - 0xC1,0xE7,0x67, 0xD2,0xF8,0x78, 0xE3,0xFF,0x86, 0xF4,0xFF,0x92, + 0x00,0x1B,0x08, 0x06,0x2C,0x0B, 0x17,0x3D,0x0B, 0x28,0x4E,0x0B, + 0x39,0x5F,0x0B, 0x4A,0x70,0x0B, 0x5B,0x81,0x0B, 0x6C,0x92,0x12, + 0x7D,0xA3,0x23, 0x8E,0xB4,0x34, 0x9F,0xC5,0x45, 0xB0,0xD6,0x56, + 0xC1,0xE7,0x67, 0xD2,0xF8,0x78, 0xE3,0xFF,0x86, 0xF4,0xFF,0x92, ORANGE-GREEN - 0x13,0x0B,0x00, 0x24,0x1C,0x00, 0x35,0x2D,0x00, 0x46,0x3E,0x00, - 0x57,0x4F,0x00, 0x68,0x60,0x00, 0x79,0x71,0x00, 0x8A,0x82,0x08, - 0x9B,0x93,0x19, 0xAC,0xA4,0x2A, 0xBD,0xB5,0x3B, 0xCE,0xC6,0x4C, - 0xDF,0xD7,0x5D, 0xF0,0xE8,0x6E, 0xFF,0xF9,0x7F, 0xFF,0xFF,0x92, + 0x13,0x0B,0x00, 0x24,0x1C,0x00, 0x35,0x2D,0x00, 0x46,0x3E,0x00, + 0x57,0x4F,0x00, 0x68,0x60,0x00, 0x79,0x71,0x00, 0x8A,0x82,0x08, + 0x9B,0x93,0x19, 0xAC,0xA4,0x2A, 0xBD,0xB5,0x3B, 0xCE,0xC6,0x4C, + 0xDF,0xD7,0x5D, 0xF0,0xE8,0x6E, 0xFF,0xF9,0x7F, 0xFF,0xFF,0x92, LIGHT-ORANGE - 0x2D,0x00,0x00, 0x3E,0x0A,0x00, 0x4F,0x1B,0x00, 0x60,0x2C,0x00, - 0x71,0x3D,0x00, 0x82,0x4E,0x00, 0x93,0x5F,0x05, 0xA4,0x70,0x16, - 0xB5,0x81,0x27, 0xC4,0x90,0x37, 0xD7,0xA3,0x49, 0xE8,0xB4,0x5A, - 0xF9,0xC5,0x6B, 0xFF,0xD6,0x80, 0xFF,0xE7,0x96, 0xFF,0xF8,0xAC, + 0x2D,0x00,0x00, 0x3E,0x0A,0x00, 0x4F,0x1B,0x00, 0x60,0x2C,0x00, + 0x71,0x3D,0x00, 0x82,0x4E,0x00, 0x93,0x5F,0x05, 0xA4,0x70,0x16, + 0xB5,0x81,0x27, 0xC4,0x90,0x37, 0xD7,0xA3,0x49, 0xE8,0xB4,0x5A, + 0xF9,0xC5,0x6B, 0xFF,0xD6,0x80, 0xFF,0xE7,0x96, 0xFF,0xF8,0xAC, ******************************************************************* ******************************************************************* PALETTE - 27.7 PHASE SHIFT GREY - 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, - 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, - 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, - 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, + 0x00,0x00,0x00, 0x11,0x11,0x11, 0x22,0x22,0x22, 0x33,0x33,0x33, + 0x44,0x44,0x44, 0x55,0x55,0x55, 0x66,0x66,0x66, 0x77,0x77,0x77, + 0x88,0x88,0x88, 0x99,0x99,0x99, 0xAA,0xAA,0xAA, 0xBB,0xBB,0xBB, + 0xCC,0xCC,0xCC, 0xDD,0xDD,0xDD, 0xEE,0xEE,0xEE, 0xFF,0xFF,0xFF, GOLD - 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, - 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, - 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, - 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xFF,0x97, + 0x1A,0x07,0x00, 0x2B,0x18,0x00, 0x3C,0x29,0x00, 0x4D,0x3A,0x00, + 0x5E,0x4B,0x00, 0x6F,0x5C,0x00, 0x80,0x6D,0x00, 0x91,0x7E,0x09, + 0xA2,0x8F,0x1A, 0xB3,0xA0,0x2B, 0xC4,0xB1,0x3C, 0xD5,0xC2,0x4D, + 0xE6,0xD3,0x5E, 0xF7,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xFF,0x97, ORANGE - 0x32,0x00,0x00, 0x43,0x05,0x00, 0x54,0x16,0x00, 0x65,0x27,0x00, - 0x76,0x38,0x00, 0x87,0x49,0x00, 0x98,0x5A,0x0C, 0xA9,0x6B,0x1D, - 0xBA,0x7C,0x2E, 0xCB,0x8D,0x3F, 0xDC,0x9E,0x50, 0xED,0xAF,0x61, - 0xFE,0xC0,0x72, 0xFF,0xD1,0x88, 0xFF,0xE2,0x9E, 0xFF,0xF3,0xB4, + 0x32,0x00,0x00, 0x43,0x05,0x00, 0x54,0x16,0x00, 0x65,0x27,0x00, + 0x76,0x38,0x00, 0x87,0x49,0x00, 0x98,0x5A,0x0C, 0xA9,0x6B,0x1D, + 0xBA,0x7C,0x2E, 0xCB,0x8D,0x3F, 0xDC,0x9E,0x50, 0xED,0xAF,0x61, + 0xFE,0xC0,0x72, 0xFF,0xD1,0x88, 0xFF,0xE2,0x9E, 0xFF,0xF3,0xB4, RED-ORANGE - 0x3F,0x00,0x00, 0x50,0x00,0x00, 0x61,0x06,0x00, 0x72,0x17,0x03, - 0x83,0x28,0x14, 0x94,0x39,0x25, 0xA5,0x4A,0x36, 0xB6,0x5B,0x47, - 0xC7,0x6C,0x58, 0xD8,0x7D,0x69, 0xE9,0x8E,0x7A, 0xFA,0x9F,0x8B, - 0xFF,0xB0,0x9F, 0xFF,0xC1,0xB5, 0xFF,0xD2,0xCB, 0xFF,0xE3,0xE1, + 0x3F,0x00,0x00, 0x50,0x00,0x00, 0x61,0x06,0x00, 0x72,0x17,0x03, + 0x83,0x28,0x14, 0x94,0x39,0x25, 0xA5,0x4A,0x36, 0xB6,0x5B,0x47, + 0xC7,0x6C,0x58, 0xD8,0x7D,0x69, 0xE9,0x8E,0x7A, 0xFA,0x9F,0x8B, + 0xFF,0xB0,0x9F, 0xFF,0xC1,0xB5, 0xFF,0xD2,0xCB, 0xFF,0xE3,0xE1, PINK - 0x3D,0x00,0x10, 0x4E,0x00,0x1C, 0x5F,0x00,0x27, 0x70,0x0D,0x37, - 0x81,0x1E,0x48, 0x92,0x2F,0x59, 0xA3,0x40,0x6A, 0xB4,0x51,0x7B, - 0xC5,0x62,0x8C, 0xD6,0x73,0x9D, 0xE7,0x84,0xAE, 0xF8,0x95,0xBF, - 0xFF,0xA6,0xD3, 0xFF,0xB7,0xE9, 0xFF,0xC8,0xEE, 0xFF,0xD9,0xF4, + 0x3D,0x00,0x10, 0x4E,0x00,0x1C, 0x5F,0x00,0x27, 0x70,0x0D,0x37, + 0x81,0x1E,0x48, 0x92,0x2F,0x59, 0xA3,0x40,0x6A, 0xB4,0x51,0x7B, + 0xC5,0x62,0x8C, 0xD6,0x73,0x9D, 0xE7,0x84,0xAE, 0xF8,0x95,0xBF, + 0xFF,0xA6,0xD3, 0xFF,0xB7,0xE9, 0xFF,0xC8,0xEE, 0xFF,0xD9,0xF4, PURPLE - 0x2D,0x00,0x42, 0x3E,0x00,0x4E, 0x4F,0x00,0x5A, 0x60,0x0C,0x6A, - 0x71,0x1D,0x7B, 0x82,0x2E,0x8C, 0x93,0x3F,0x9D, 0xA4,0x50,0xAE, - 0xB5,0x61,0xBF, 0xC6,0x72,0xD0, 0xD7,0x83,0xE1, 0xE8,0x94,0xE6, - 0xF9,0xA5,0xE6, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, + 0x2D,0x00,0x42, 0x3E,0x00,0x4E, 0x4F,0x00,0x5A, 0x60,0x0C,0x6A, + 0x71,0x1D,0x7B, 0x82,0x2E,0x8C, 0x93,0x3F,0x9D, 0xA4,0x50,0xAE, + 0xB5,0x61,0xBF, 0xC6,0x72,0xD0, 0xD7,0x83,0xE1, 0xE8,0x94,0xE6, + 0xF9,0xA5,0xE6, 0xFF,0xB6,0xE9, 0xFF,0xC7,0xEE, 0xFF,0xD8,0xF3, PURPLE-BLUE - 0x13,0x00,0x67, 0x24,0x00,0x73, 0x35,0x03,0x80, 0x46,0x14,0x91, - 0x57,0x25,0xA2, 0x68,0x36,0xB3, 0x79,0x47,0xC4, 0x8A,0x58,0xD5, - 0x9B,0x69,0xE6, 0xAC,0x7A,0xF0, 0xBD,0x8B,0xF0, 0xCE,0x9C,0xF0, - 0xDF,0xAD,0xF0, 0xF0,0xBE,0xF0, 0xFF,0xCF,0xF1, 0xFF,0xE0,0xF6, + 0x13,0x00,0x67, 0x24,0x00,0x73, 0x35,0x03,0x80, 0x46,0x14,0x91, + 0x57,0x25,0xA2, 0x68,0x36,0xB3, 0x79,0x47,0xC4, 0x8A,0x58,0xD5, + 0x9B,0x69,0xE6, 0xAC,0x7A,0xF0, 0xBD,0x8B,0xF0, 0xCE,0x9C,0xF0, + 0xDF,0xAD,0xF0, 0xF0,0xBE,0xF0, 0xFF,0xCF,0xF1, 0xFF,0xE0,0xF6, BLUE1 - 0x00,0x00,0x70, 0x05,0x01,0x80, 0x16,0x12,0x91, 0x27,0x23,0xA2, - 0x38,0x34,0xB3, 0x49,0x45,0xC4, 0x5A,0x56,0xD5, 0x6B,0x67,0xE6, - 0x7C,0x78,0xF7, 0x8D,0x89,0xFE, 0x9E,0x9A,0xFE, 0xAF,0xAB,0xFE, - 0xC0,0xBC,0xFE, 0xD1,0xCD,0xFE, 0xE2,0xDE,0xFE, 0xF3,0xEF,0xFE, + 0x00,0x00,0x70, 0x05,0x01,0x80, 0x16,0x12,0x91, 0x27,0x23,0xA2, + 0x38,0x34,0xB3, 0x49,0x45,0xC4, 0x5A,0x56,0xD5, 0x6B,0x67,0xE6, + 0x7C,0x78,0xF7, 0x8D,0x89,0xFE, 0x9E,0x9A,0xFE, 0xAF,0xAB,0xFE, + 0xC0,0xBC,0xFE, 0xD1,0xCD,0xFE, 0xE2,0xDE,0xFE, 0xF3,0xEF,0xFE, BLUE2 - 0x00,0x03,0x5B, 0x00,0x14,0x71, 0x00,0x25,0x87, 0x0C,0x36,0x9A, - 0x1D,0x47,0xAB, 0x2E,0x58,0xBC, 0x3F,0x69,0xCD, 0x50,0x7A,0xDE, - 0x61,0x8B,0xEF, 0x72,0x9C,0xFF, 0x83,0xAD,0xFF, 0x94,0xBE,0xFF, - 0xA5,0xCF,0xFF, 0xB6,0xE0,0xFF, 0xC7,0xF1,0xFF, 0xD8,0xFF,0xFF, + 0x00,0x03,0x5B, 0x00,0x14,0x71, 0x00,0x25,0x87, 0x0C,0x36,0x9A, + 0x1D,0x47,0xAB, 0x2E,0x58,0xBC, 0x3F,0x69,0xCD, 0x50,0x7A,0xDE, + 0x61,0x8B,0xEF, 0x72,0x9C,0xFF, 0x83,0xAD,0xFF, 0x94,0xBE,0xFF, + 0xA5,0xCF,0xFF, 0xB6,0xE0,0xFF, 0xC7,0xF1,0xFF, 0xD8,0xFF,0xFF, LIGHT-BLUE - 0x00,0x15,0x35, 0x00,0x26,0x4B, 0x00,0x37,0x61, 0x00,0x48,0x78, - 0x0A,0x59,0x8B, 0x1B,0x6A,0x9C, 0x2C,0x7B,0xAD, 0x3D,0x8C,0xBE, - 0x4E,0x9D,0xCF, 0x5F,0xAE,0xE0, 0x70,0xBF,0xF1, 0x81,0xD0,0xFF, - 0x92,0xE1,0xFF, 0xA3,0xF2,0xFF, 0xB4,0xFF,0xFF, 0xC5,0xFF,0xFF, + 0x00,0x15,0x35, 0x00,0x26,0x4B, 0x00,0x37,0x61, 0x00,0x48,0x78, + 0x0A,0x59,0x8B, 0x1B,0x6A,0x9C, 0x2C,0x7B,0xAD, 0x3D,0x8C,0xBE, + 0x4E,0x9D,0xCF, 0x5F,0xAE,0xE0, 0x70,0xBF,0xF1, 0x81,0xD0,0xFF, + 0x92,0xE1,0xFF, 0xA3,0xF2,0xFF, 0xB4,0xFF,0xFF, 0xC5,0xFF,0xFF, TURQUOISE - 0x00,0x22,0x0A, 0x00,0x33,0x19, 0x00,0x44,0x2F, 0x00,0x55,0x45, - 0x04,0x66,0x5A, 0x15,0x77,0x6B, 0x26,0x88,0x7C, 0x37,0x99,0x8D, - 0x48,0xAA,0x9E, 0x59,0xBB,0xAF, 0x6A,0xCC,0xC0, 0x7B,0xDD,0xD1, - 0x8C,0xEE,0xE2, 0x9D,0xFF,0xF3, 0xAE,0xFF,0xFF, 0xBF,0xFF,0xFF, + 0x00,0x22,0x0A, 0x00,0x33,0x19, 0x00,0x44,0x2F, 0x00,0x55,0x45, + 0x04,0x66,0x5A, 0x15,0x77,0x6B, 0x26,0x88,0x7C, 0x37,0x99,0x8D, + 0x48,0xAA,0x9E, 0x59,0xBB,0xAF, 0x6A,0xCC,0xC0, 0x7B,0xDD,0xD1, + 0x8C,0xEE,0xE2, 0x9D,0xFF,0xF3, 0xAE,0xFF,0xFF, 0xBF,0xFF,0xFF, GREEN-BLUE - 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1B, - 0x0D,0x6B,0x25, 0x1E,0x7C,0x36, 0x2F,0x8D,0x47, 0x40,0x9E,0x58, - 0x51,0xAF,0x69, 0x62,0xC0,0x7A, 0x73,0xD1,0x8B, 0x84,0xE2,0x9C, - 0x95,0xF3,0xAD, 0xA6,0xFF,0xBD, 0xB7,0xFF,0xC9, 0xC8,0xFF,0xD4, + 0x00,0x27,0x0C, 0x00,0x38,0x11, 0x00,0x49,0x16, 0x00,0x5A,0x1B, + 0x0D,0x6B,0x25, 0x1E,0x7C,0x36, 0x2F,0x8D,0x47, 0x40,0x9E,0x58, + 0x51,0xAF,0x69, 0x62,0xC0,0x7A, 0x73,0xD1,0x8B, 0x84,0xE2,0x9C, + 0x95,0xF3,0xAD, 0xA6,0xFF,0xBD, 0xB7,0xFF,0xC9, 0xC8,0xFF,0xD4, GREEN - 0x00,0x24,0x0B, 0x00,0x35,0x10, 0x01,0x46,0x15, 0x12,0x57,0x15, - 0x23,0x68,0x15, 0x34,0x79,0x15, 0x45,0x8A,0x19, 0x56,0x9B,0x2A, - 0x67,0xAC,0x3B, 0x78,0xBD,0x4C, 0x89,0xCE,0x5D, 0x9A,0xDF,0x6E, - 0xAB,0xF0,0x7F, 0xBC,0xFF,0x8F, 0xCD,0xFF,0x9B, 0xDE,0xFF,0xA7, + 0x00,0x24,0x0B, 0x00,0x35,0x10, 0x01,0x46,0x15, 0x12,0x57,0x15, + 0x23,0x68,0x15, 0x34,0x79,0x15, 0x45,0x8A,0x19, 0x56,0x9B,0x2A, + 0x67,0xAC,0x3B, 0x78,0xBD,0x4C, 0x89,0xCE,0x5D, 0x9A,0xDF,0x6E, + 0xAB,0xF0,0x7F, 0xBC,0xFF,0x8F, 0xCD,0xFF,0x9B, 0xDE,0xFF,0xA7, YELLOW-GREEN - 0x00,0x18,0x07, 0x00,0x29,0x0C, 0x1E,0x3A,0x08, 0x2F,0x4B,0x08, - 0x40,0x5C,0x08, 0x51,0x6D,0x08, 0x62,0x7E,0x08, 0x73,0x8F,0x0D, - 0x84,0xA0,0x1E, 0x95,0xB1,0x2F, 0xA6,0xC2,0x40, 0xB7,0xD3,0x51, - 0xC8,0xE4,0x62, 0xD9,0xF5,0x73, 0xEA,0xFF,0x82, 0xFB,0xFF,0x8E, + 0x00,0x18,0x07, 0x00,0x29,0x0C, 0x1E,0x3A,0x08, 0x2F,0x4B,0x08, + 0x40,0x5C,0x08, 0x51,0x6D,0x08, 0x62,0x7E,0x08, 0x73,0x8F,0x0D, + 0x84,0xA0,0x1E, 0x95,0xB1,0x2F, 0xA6,0xC2,0x40, 0xB7,0xD3,0x51, + 0xC8,0xE4,0x62, 0xD9,0xF5,0x73, 0xEA,0xFF,0x82, 0xFB,0xFF,0x8E, ORANGE-GREEN - 0x1B,0x07,0x00, 0x2C,0x18,0x00, 0x3D,0x29,0x00, 0x4E,0x3A,0x00, - 0x5F,0x4B,0x00, 0x70,0x5C,0x00, 0x81,0x6D,0x00, 0x92,0x7E,0x09, - 0xA3,0x8F,0x1A, 0xB4,0xA0,0x2B, 0xC5,0xB1,0x3C, 0xD6,0xC2,0x4D, - 0xE7,0xD3,0x5E, 0xF8,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xFF,0x97, + 0x1B,0x07,0x00, 0x2C,0x18,0x00, 0x3D,0x29,0x00, 0x4E,0x3A,0x00, + 0x5F,0x4B,0x00, 0x70,0x5C,0x00, 0x81,0x6D,0x00, 0x92,0x7E,0x09, + 0xA3,0x8F,0x1A, 0xB4,0xA0,0x2B, 0xC5,0xB1,0x3C, 0xD6,0xC2,0x4D, + 0xE7,0xD3,0x5E, 0xF8,0xE4,0x6F, 0xFF,0xF5,0x83, 0xFF,0xFF,0x97, LIGHT-ORANGE - 0x33,0x00,0x00, 0x44,0x05,0x00, 0x55,0x16,0x00, 0x66,0x27,0x00, - 0x77,0x38,0x00, 0x88,0x49,0x00, 0x99,0x5A,0x0D, 0xAA,0x6B,0x1E, - 0xBB,0x7C,0x2F, 0xCC,0x8D,0x40, 0xDD,0x9E,0x51, 0xEE,0xAF,0x62, - 0xFF,0xC0,0x73, 0xFF,0xD1,0x89, 0xFF,0xE2,0x9F, 0xFF,0xF3,0xB5 + 0x33,0x00,0x00, 0x44,0x05,0x00, 0x55,0x16,0x00, 0x66,0x27,0x00, + 0x77,0x38,0x00, 0x88,0x49,0x00, 0x99,0x5A,0x0D, 0xAA,0x6B,0x1E, + 0xBB,0x7C,0x2F, 0xCC,0x8D,0x40, 0xDD,0x9E,0x51, 0xEE,0xAF,0x62, + 0xFF,0xC0,0x73, 0xFF,0xD1,0x89, 0xFF,0xE2,0x9F, 0xFF,0xF3,0xB5 *******************************************************************/ /************************************************************** diff --git a/src/mess/drivers/bullet.c b/src/mess/drivers/bullet.c index 34de3211aa..8de35055c4 100644 --- a/src/mess/drivers/bullet.c +++ b/src/mess/drivers/bullet.c @@ -53,7 +53,7 @@ Notes: - memory banking is broken - z80dart wait/ready - IMI 7710 Winchester controller - chdman createhd -o imi7710.chd -chs 350,3,10 -ss 1024 + chdman createhd -o imi7710.chd -chs 350,3,10 -ss 1024 - revision E model */ diff --git a/src/mess/drivers/c80.c b/src/mess/drivers/c80.c index 55a714a3bc..4489c0abbf 100644 --- a/src/mess/drivers/c80.c +++ b/src/mess/drivers/c80.c @@ -20,7 +20,7 @@ Commands: M : MEMory manipulation G : GO F10 : RESet - ESC : BRK + ESC : BRK Functions (press F1 then the indicated number): 0 : FILL diff --git a/src/mess/drivers/cbm2.c b/src/mess/drivers/cbm2.c index 76e9bf38eb..ea45d0446b 100644 --- a/src/mess/drivers/cbm2.c +++ b/src/mess/drivers/cbm2.c @@ -2166,7 +2166,7 @@ static MACHINE_CONFIG_START( p500_ntsc, p500_state ) MCFG_PLS100_ADD(PLA2_TAG) MCFG_TPI6525_ADD(MOS6525_1_TAG, p500_tpi1_intf) MCFG_TPI6525_ADD(MOS6525_2_TAG, p500_tpi2_intf) - + MCFG_DEVICE_ADD(MOS6551A_TAG, MOS6551, XTAL_1_8432MHz) MCFG_MOS6551_IRQ_HANDLER(DEVWRITELINE(MOS6525_1_TAG, tpi6525_device, i4_w)) MCFG_MOS6551_TXD_HANDLER(DEVWRITELINE(RS232_TAG, rs232_port_device, tx)) diff --git a/src/mess/drivers/ec184x.c b/src/mess/drivers/ec184x.c index 1d85bf83f6..db72eb23ad 100644 --- a/src/mess/drivers/ec184x.c +++ b/src/mess/drivers/ec184x.c @@ -223,7 +223,7 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( ec1847_io, AS_IO, 8, ec184x_state ) ADDRESS_MAP_UNMAP_HIGH -// AM_RANGE(0x0210, 0x021f) AM_RAM // internal (non-standard?) bus extender +// AM_RANGE(0x0210, 0x021f) AM_RAM // internal (non-standard?) bus extender ADDRESS_MAP_END @@ -251,12 +251,12 @@ static MACHINE_CONFIG_START( ec1840, ec184x_state ) MCFG_IBM5150_MOTHERBOARD_ADD("mb","maincpu") MCFG_DEVICE_INPUT_DEFAULTS(ec1840) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "mda", false) // cga is? an option + MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "mda", false) // cga is? an option MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false) // native variant(s?) not emulated - MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false) // native serial not emulated - MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false) // native mouse port not emulated - MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false) // game port is an option + MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false) // native variant(s?) not emulated + MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false) // native serial not emulated + MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false) // native mouse port not emulated + MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false) // game port is an option MCFG_SOFTWARE_LIST_ADD("flop_list","ec1841") @@ -271,7 +271,7 @@ static MACHINE_CONFIG_START( ec1841, ec184x_state ) MCFG_CPU_PROGRAM_MAP(ec1841_map) MCFG_CPU_IO_MAP(ec1841_io) -// MCFG_MACHINE_START_OVERRIDE(ec184x_state, ec184x) +// MCFG_MACHINE_START_OVERRIDE(ec184x_state, ec184x) MCFG_MACHINE_RESET_OVERRIDE(ec184x_state, ec184x) MCFG_EC1841_MOTHERBOARD_ADD("mb", "maincpu") @@ -279,10 +279,10 @@ static MACHINE_CONFIG_START( ec1841, ec184x_state ) MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "cga_ec1841", false)// mda is an option MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false) // native variants not emulated - MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false) // native serial not emulated - MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false) // native mouse port not emulated - MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false) // game port is? an option + MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false) // native variants not emulated + MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false) // native serial not emulated + MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false) // native mouse port not emulated + MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false) // game port is? an option MCFG_SOFTWARE_LIST_ADD("flop_list","ec1841") @@ -290,7 +290,7 @@ static MACHINE_CONFIG_START( ec1841, ec184x_state ) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("512K") - MCFG_RAM_EXTRA_OPTIONS("1024K,1576K,2048K") // 640K variant not emulated + MCFG_RAM_EXTRA_OPTIONS("1024K,1576K,2048K") // 640K variant not emulated MACHINE_CONFIG_END // XXX verify everything @@ -302,10 +302,10 @@ static MACHINE_CONFIG_START( ec1847, ec184x_state ) MCFG_IBM5160_MOTHERBOARD_ADD("mb","maincpu") MCFG_DEVICE_INPUT_DEFAULTS(ec1847) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "hercules", false) // cga, ega and vga(?) are options too + MCFG_ISA8_SLOT_ADD("mb:isa", "isa1", pc_isa8_cards, "hercules", false) // cga, ega and vga(?) are options too MCFG_ISA8_SLOT_ADD("mb:isa", "isa2", pc_isa8_cards, "fdc_xt", false) - MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false) // native variant (wd1010 + z80) not emulated - MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false) // native serial (2x8251) not emulated + MCFG_ISA8_SLOT_ADD("mb:isa", "isa3", pc_isa8_cards, NULL, false) // native variant (wd1010 + z80) not emulated + MCFG_ISA8_SLOT_ADD("mb:isa", "isa4", pc_isa8_cards, NULL, false) // native serial (2x8251) not emulated MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false) MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false) diff --git a/src/mess/drivers/esqasr.c b/src/mess/drivers/esqasr.c index 4aca942956..d3001da909 100644 --- a/src/mess/drivers/esqasr.c +++ b/src/mess/drivers/esqasr.c @@ -8,31 +8,31 @@ CPU: 68302 MCU Sound: ES5506 Effects: ES5510 - FDC: NEC uPD72069 - DUART: 2681 - + FDC: NEC uPD72069 + DUART: 2681 + Memory map: 0x000000-0x03ffff OS ROM 0xfb0000-0xfcffff OS RAM - - + + ASR-X hardware: - CPU: 68340 MCU + CPU: 68340 MCU Sound: ES5506 Effects: ES5511 - FDC: NEC uPD72069 - - http://www.gweep.net/~shifty/music/asrxhack/ - + FDC: NEC uPD72069 + + http://www.gweep.net/~shifty/music/asrxhack/ + Memory map: 0x00000000-0x000fffff OS ROM 0x00800000-0x008000ff ESP2 5511? 0x00f00000-0x00f007ff Unknown 0x08000000-0x08200000 RAM 0x0be00000-0x0befffff RAM (size unknown) - + These may want to be separated when they run more. - + ***************************************************************************/ #include "emu.h" @@ -99,7 +99,7 @@ static const es5506_interface es5506_config = }; static MACHINE_CONFIG_START( asr, esqasr_state ) - MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) // actually MC68302 + MCFG_CPU_ADD("maincpu", M68000, XTAL_16MHz) // actually MC68302 MCFG_CPU_PROGRAM_MAP(asr_map) MCFG_CPU_ADD("esp", ES5510, XTAL_10MHz) @@ -115,7 +115,7 @@ static MACHINE_CONFIG_START( asr, esqasr_state ) MACHINE_CONFIG_END static MACHINE_CONFIG_START( asrx, esqasr_state ) - MCFG_CPU_ADD("maincpu", M68020, XTAL_16MHz) // unknown, possibly 68340? + MCFG_CPU_ADD("maincpu", M68020, XTAL_16MHz) // unknown, possibly 68340? MCFG_CPU_PROGRAM_MAP(asrx_map) MCFG_CPU_ADD("esp", ES5510, XTAL_10MHz) @@ -135,8 +135,8 @@ INPUT_PORTS_END ROM_START( asr10 ) ROM_REGION(0x100000, "maincpu", 0) - ROM_LOAD16_BYTE( "asr-648c-lo-1.5b.bin", 0x000001, 0x020000, CRC(8e437843) SHA1(418f042acbc5323f5b59cbbd71fdc8b2d851f7d0) ) - ROM_LOAD16_BYTE( "asr-65e0-hi-1.5b.bin", 0x000000, 0x020000, CRC(b37cd3b6) SHA1(c4371848428a628b5e5a50e99be602d7abfc7904) ) + ROM_LOAD16_BYTE( "asr-648c-lo-1.5b.bin", 0x000001, 0x020000, CRC(8e437843) SHA1(418f042acbc5323f5b59cbbd71fdc8b2d851f7d0) ) + ROM_LOAD16_BYTE( "asr-65e0-hi-1.5b.bin", 0x000000, 0x020000, CRC(b37cd3b6) SHA1(c4371848428a628b5e5a50e99be602d7abfc7904) ) ROM_REGION(0x200000, "waverom", ROMREGION_ERASE00) ROM_REGION(0x200000, "waverom2", ROMREGION_ERASE00) @@ -146,8 +146,8 @@ ROM_END ROM_START( asrx ) ROM_REGION(0x100000, "maincpu", 0) - ROM_LOAD16_BYTE( "asr267lo.bin", 0x000001, 0x080000, CRC(7408d441) SHA1(0113f84b6d224bf1423ad62c173f32a0c95ca715) ) - ROM_LOAD16_BYTE( "asr267hi.bin", 0x000000, 0x080000, CRC(7df14ea7) SHA1(895b99013c0f924edb52612eb93c3e6babb9f053) ) + ROM_LOAD16_BYTE( "asr267lo.bin", 0x000001, 0x080000, CRC(7408d441) SHA1(0113f84b6d224bf1423ad62c173f32a0c95ca715) ) + ROM_LOAD16_BYTE( "asr267hi.bin", 0x000000, 0x080000, CRC(7df14ea7) SHA1(895b99013c0f924edb52612eb93c3e6babb9f053) ) ROM_REGION(0x200000, "waverom", ROMREGION_ERASE00) ROM_REGION(0x200000, "waverom2", ROMREGION_ERASE00) diff --git a/src/mess/drivers/esqkt.c b/src/mess/drivers/esqkt.c index 300dd27509..ee2cc923fb 100644 --- a/src/mess/drivers/esqkt.c +++ b/src/mess/drivers/esqkt.c @@ -291,4 +291,3 @@ DRIVER_INIT_MEMBER(esqkt_state, kt) } CONS( 1996, kt76, 0, 0, kt, kt, esqkt_state, kt, "Ensoniq", "KT-76", GAME_NOT_WORKING ) - diff --git a/src/mess/drivers/ht68k.c b/src/mess/drivers/ht68k.c index e2d4dd5247..c274524054 100644 --- a/src/mess/drivers/ht68k.c +++ b/src/mess/drivers/ht68k.c @@ -87,7 +87,7 @@ void ht68k_state::machine_reset() memcpy((UINT8*)m_p_ram.target(),user1,0x8000); m_maincpu->reset(); - + m_fdc->reset(); m_fdc->set_floppy(NULL); } diff --git a/src/mess/drivers/isbc.c b/src/mess/drivers/isbc.c index 127b1a454a..e298acc13d 100644 --- a/src/mess/drivers/isbc.c +++ b/src/mess/drivers/isbc.c @@ -360,9 +360,9 @@ ROM_START( isbc286 ) ROM_REGION( 0x20000, "user1", ROMREGION_ERASEFF ) ROM_LOAD16_BYTE( "u79.bin", 0x00001, 0x10000, CRC(144182ea) SHA1(4620ca205a6ac98fe2636183eaead7c4bfaf7a72)) ROM_LOAD16_BYTE( "u36.bin", 0x00000, 0x10000, CRC(22db075f) SHA1(fd29ea77f5fc0697c8f8b66aca549aad5b9db3ea)) -// ROM_REGION( 0x4000, "isbc215", ROMREGION_ERASEFF ) -// ROM_LOAD16_BYTE( "174581.001.bin", 0x0000, 0x2000, CRC(ccdbc7ab) SHA1(5c2ebdde1b0252124177221ba9cacdb6d925a24d)) -// ROM_LOAD16_BYTE( "174581.002.bin", 0x0001, 0x2000, CRC(6190fa67) SHA1(295dd4e75f699aaf93227cc4876cee8accae383a)) +// ROM_REGION( 0x4000, "isbc215", ROMREGION_ERASEFF ) +// ROM_LOAD16_BYTE( "174581.001.bin", 0x0000, 0x2000, CRC(ccdbc7ab) SHA1(5c2ebdde1b0252124177221ba9cacdb6d925a24d)) +// ROM_LOAD16_BYTE( "174581.002.bin", 0x0001, 0x2000, CRC(6190fa67) SHA1(295dd4e75f699aaf93227cc4876cee8accae383a)) ROM_END ROM_START( isbc2861 ) diff --git a/src/mess/drivers/iskr103x.c b/src/mess/drivers/iskr103x.c index 9cefd275e8..7369b47a49 100644 --- a/src/mess/drivers/iskr103x.c +++ b/src/mess/drivers/iskr103x.c @@ -83,7 +83,7 @@ static MACHINE_CONFIG_START( iskr1030m, iskr103x_state ) MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false) MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_EC_1841) -// MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030) +// MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") @@ -105,10 +105,10 @@ static MACHINE_CONFIG_START( iskr1031, iskr103x_state ) MCFG_ISA8_SLOT_ADD("mb:isa", "isa5", pc_isa8_cards, NULL, false) MCFG_ISA8_SLOT_ADD("mb:isa", "isa6", pc_isa8_cards, NULL, false) -// MCFG_SOFTWARE_LIST_ADD("flop_list", "iskr1031") +// MCFG_SOFTWARE_LIST_ADD("flop_list", "iskr1031") MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_EC_1841) -// MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030) +// MCFG_PC_KBDC_SLOT_ADD("mb:pc_kbdc", "kbd", pc_xt_keyboards, STR_KBD_ISKR_1030) MCFG_RAM_ADD(RAM_TAG) MCFG_RAM_DEFAULT_SIZE("640K") diff --git a/src/mess/drivers/itt3030.c b/src/mess/drivers/itt3030.c index 3b93589b1f..1f6599ab0d 100644 --- a/src/mess/drivers/itt3030.c +++ b/src/mess/drivers/itt3030.c @@ -2,84 +2,84 @@ ITT 3030 - - ToDo: - - Check Beeper - - finish hooking up keyboard - - According to the manual, the keyboard is based on a 8278 ... it's nowhere to be found. The keyboard / video card has a 8741 instead of which a ROM dump exists - - serial port - - daisy chain - - ... - - CPU Board, all ICs shown: - - |-----------------------------------------------------------------| - | | - | 74LS640N Z80_Combo 74LS138N | - | 74LS00N | - | 74LS240N 74LS74AN | - | 74LS00N | - |C 74LS240N Z80_CPU 74LS240N C| - |N 74LS74AN N| - |1 74LS241N 74LS240N 2| - | ROM_1 74LS20N 74LS38N | - | 74LS240N 74LS240N | - | 74LS04N 74LS02N | - | 74LS138N 74LS74AN | - | 74LS175N | - | 75154N 74LS156N 74LS00N | - | 74LS123N | - | 75150P 75150P 74LS175N X1 74LS00N 74LS132N | - |-----------------------------------------------------------------| - - Z80_Combo: Mostek MK3886 Z80 Combo Chip, Serial, Timer, 256 bytes RAM, Interrupt Controller - Z80_CPU: Zilog Z80A CPU - ROM_1: NEC D2716D marked "BOOTV1.2" - X1: Crystal 4,194 MHz - CN1: Bus Connector - CN2: Memory Board Connector - ----------------------------------------------------------------------------------- - - Video / Keyboard Combination board, all ICs shown: - - |-----------------------------------------------------------------| - | | - | X1 74276N MCU_1 74LS85N | - | | - | 74LS138N 74LS240 74LS240N | - | 75LS257AN 74LS166AN | - | 74LS08N 74LS85N 74LS241N | - | 75LS257AN ROM_1 C| - | 74LS132N 74LS32N 74LS240N N| - | 75LS257AN 1| - | 74LS10N 74LS08N 74LS240N | - | 75LS257AN RAM_1 | - | 74LS163AN 74LS173AN 74LS374N | - | | - | 74LS86N 74LS240N 74LS640N | - | Video_1 | - | 74LS74AN 74LS240N 74LS640N | - |-----------------------------------------------------------------| - - X1: Crystal 6 MHz - MCU_1: NEC D8741AD marked "V1.1 3030" - ROM_1: MBM 2716 marked "GB 136-0" - RAM_1: NEC D4016D - Video_1 Video-IC SND5027E, compatible with TMS9927 + ToDo: + - Check Beeper + - finish hooking up keyboard + - According to the manual, the keyboard is based on a 8278 ... it's nowhere to be found. The keyboard / video card has a 8741 instead of which a ROM dump exists + - serial port + - daisy chain + - ... + + + CPU Board, all ICs shown: + + |-----------------------------------------------------------------| + | | + | 74LS640N Z80_Combo 74LS138N | + | 74LS00N | + | 74LS240N 74LS74AN | + | 74LS00N | + |C 74LS240N Z80_CPU 74LS240N C| + |N 74LS74AN N| + |1 74LS241N 74LS240N 2| + | ROM_1 74LS20N 74LS38N | + | 74LS240N 74LS240N | + | 74LS04N 74LS02N | + | 74LS138N 74LS74AN | + | 74LS175N | + | 75154N 74LS156N 74LS00N | + | 74LS123N | + | 75150P 75150P 74LS175N X1 74LS00N 74LS132N | + |-----------------------------------------------------------------| + + Z80_Combo: Mostek MK3886 Z80 Combo Chip, Serial, Timer, 256 bytes RAM, Interrupt Controller + Z80_CPU: Zilog Z80A CPU + ROM_1: NEC D2716D marked "BOOTV1.2" + X1: Crystal 4,194 MHz + CN1: Bus Connector + CN2: Memory Board Connector ---------------------------------------------------------------------------------- - - Floppy Controller board, all ICs shown - |-----------------------------------------------------------------| - | | + Video / Keyboard Combination board, all ICs shown: + + |-----------------------------------------------------------------| + | | + | X1 74276N MCU_1 74LS85N | + | | + | 74LS138N 74LS240 74LS240N | + | 75LS257AN 74LS166AN | + | 74LS08N 74LS85N 74LS241N | + | 75LS257AN ROM_1 C| + | 74LS132N 74LS32N 74LS240N N| + | 75LS257AN 1| + | 74LS10N 74LS08N 74LS240N | + | 75LS257AN RAM_1 | + | 74LS163AN 74LS173AN 74LS374N | + | | + | 74LS86N 74LS240N 74LS640N | + | Video_1 | + | 74LS74AN 74LS240N 74LS640N | + |-----------------------------------------------------------------| + + X1: Crystal 6 MHz + MCU_1: NEC D8741AD marked "V1.1 3030" + ROM_1: MBM 2716 marked "GB 136-0" + RAM_1: NEC D4016D + Video_1 Video-IC SND5027E, compatible with TMS9927 + +---------------------------------------------------------------------------------- + + Floppy Controller board, all ICs shown + + |-----------------------------------------------------------------| + | | | X1 74LS51N F 74LS74AN 74LS02N MC4044P | | D 567 | | 74LS04N C 74LS00N 74LS01N ::: MC4024P | - | | - | 74LS00N 1 74LS74AN 74LS74AN 74LS14N C| + | | + | 74LS00N 1 74LS74AN 74LS74AN 74LS14N C| | 7 N| | 74LS240N 9 74LS161N 74LS393N 74LS74AN 1| | 1 | @@ -88,103 +88,103 @@ | 74LS123N 74LS04N 74LS163N 74LS14N 74LS241N | | | | 74LS393N 74LS138 74LS175N 74LS85N 74LS645N | - | | - |-----------------------------------------------------------------| - - X1: Crystal 8 MHz - FDC: Siemens SAB1791-02P - 567: Jumper Pad (emtpy) + | | + |-----------------------------------------------------------------| + + X1: Crystal 8 MHz + FDC: Siemens SAB1791-02P + 567: Jumper Pad (emtpy) ---------------------------------------------------------------------------------- - - 256K RAM board, all ICs shown: - - |-----------------------------------------------------------------| - | | - | HM4864P HM4864P HM4864P HM4864P 74LS245N | - | | - | HM4864P HM4864P HM4864P HM4864P P 74LS14N | - | R | - | HM4864P HM4864P HM4864P HM4864P M 74LS00N | - | C| - | HM4864P HM4864P HM4864P HM4864P AM A N| - | 29 M 1| - | HM4864P HM4864P HM4864P HM4864P 66 2 | - | PC 9 | - | HM4864P HM4864P HM4864P HM4864P 6 | - | AM 4 | - | HM4864P HM4864P HM4864P HM4864P 29 8 | - | 66 P | - | HM4864P HM4864P HM4864P HM4864P PC C | - | SN7474N | - |-----------------------------------------------------------------| - - PRM: N82S129F 1K Bipolar PROM - AM2966PC: Octal Dynamic Memory Drivers with Three-State Outputs - AM29648PC - CN1: Connector to CN2 of Z80 CPU card - + + 256K RAM board, all ICs shown: + + |-----------------------------------------------------------------| + | | + | HM4864P HM4864P HM4864P HM4864P 74LS245N | + | | + | HM4864P HM4864P HM4864P HM4864P P 74LS14N | + | R | + | HM4864P HM4864P HM4864P HM4864P M 74LS00N | + | C| + | HM4864P HM4864P HM4864P HM4864P AM A N| + | 29 M 1| + | HM4864P HM4864P HM4864P HM4864P 66 2 | + | PC 9 | + | HM4864P HM4864P HM4864P HM4864P 6 | + | AM 4 | + | HM4864P HM4864P HM4864P HM4864P 29 8 | + | 66 P | + | HM4864P HM4864P HM4864P HM4864P PC C | + | SN7474N | + |-----------------------------------------------------------------| + + PRM: N82S129F 1K Bipolar PROM + AM2966PC: Octal Dynamic Memory Drivers with Three-State Outputs + AM29648PC + CN1: Connector to CN2 of Z80 CPU card + ---------------------------------------------------------------------------------- - - Parallel I/O board, all ICs shown: - - |-------------------------------------| | - | | - | 74 74 | - | LS LS Z80A PIO | - | 00 14 | - | N N | - | | - | | - | 74 74 74 74 D4 74 | - | LS LS LS LS I3 LS | - | 13 14 24 85 P2 64 | - | 2N N 1N N 1 0N | - | | + + Parallel I/O board, all ICs shown: + + |-------------------------------------| | + | | + | 74 74 | + | LS LS Z80A PIO | + | 00 14 | + | N N | + | | + | | + | 74 74 74 74 D4 74 | + | LS LS LS LS I3 LS | + | 13 14 24 85 P2 64 | + | 2N N 1N N 1 0N | + | | | CN1 | - | | - | 74LS00N | - |-------------------------------------| + | | + | 74LS00N | + |-------------------------------------| + + CN1: Bus connector + DIP: 4x DIP current setting: off-on-on-off, sets the address for the parallel port - CN1: Bus connector - DIP: 4x DIP current setting: off-on-on-off, sets the address for the parallel port - ---------------------------------------------------------------------------------- Beeper Circuit, all ICs shown: - |---------------------------| | - | | - | BEEP 74LS132N | - | R1 | + |---------------------------| | + | | + | BEEP 74LS132N | + | R1 | | 74LS14N | | | | 74LS132N 74LS193N | - | | - | 74LS74AN 74LS165N | - | CN1 | - |---------------------------| - - CN1: Connector to mainboard - R1: looks like a potentiometer - BEEP: Beeper ... touted in the manual as "Hupe" ... i.e. "horn" :) - + | | + | 74LS74AN 74LS165N | + | CN1 | + |---------------------------| + + CN1: Connector to mainboard + R1: looks like a potentiometer + BEEP: Beeper ... touted in the manual as "Hupe" ... i.e. "horn" :) + ---------------------------------------------------------------------------------- - - Other boards and extensions mentioned in the manual: - - S100 bus adapter board - - IEEE 488 bus adapter board - - 64K memory board - - 8086 CPU board - - external harddisk - - TV adapter B/W (TV, Save/Load from Audio Cassette) with PROM/RAM/BASIC-Module with 16K or 32K RAM - - TV adapter color with connection to Video / Keyboard combination card - - Monitor adapters B/W and color - - Video / Keyboard interface 2 with grayscale, 8 colors, loadable character set, blinking - - Graphics Adapter with 16 colours, hi-res 512x256 pixels - - RTC - - Arithmetics chip - + + Other boards and extensions mentioned in the manual: + - S100 bus adapter board + - IEEE 488 bus adapter board + - 64K memory board + - 8086 CPU board + - external harddisk + - TV adapter B/W (TV, Save/Load from Audio Cassette) with PROM/RAM/BASIC-Module with 16K or 32K RAM + - TV adapter color with connection to Video / Keyboard combination card + - Monitor adapters B/W and color + - Video / Keyboard interface 2 with grayscale, 8 colors, loadable character set, blinking + - Graphics Adapter with 16 colours, hi-res 512x256 pixels + - RTC + - Arithmetics chip + ***************************************************************************/ @@ -194,9 +194,9 @@ Beeper Circuit, all ICs shown: #include "machine/bankdev.h" #include "machine/ram.h" #include "formats/itt3030_dsk.h" -#include "video/tms9927.h" //Display hardware +#include "video/tms9927.h" //Display hardware #include "sound/beep.h" -#include "cpu/mcs48/mcs48.h" //Keyboard MCU ... talks to the 8278 on the keyboard circuit +#include "cpu/mcs48/mcs48.h" //Keyboard MCU ... talks to the 8278 on the keyboard circuit #define MAIN_CLOCK XTAL_4.194MHz @@ -291,12 +291,12 @@ READ8_MEMBER(itt3030_state::vsync_r) if (machine().primary_screen->vblank()) { - ret |= 0xc0; // set both bits 6 and 7 if vblank + ret |= 0xc0; // set both bits 6 and 7 if vblank } if (machine().primary_screen->hblank()) { - ret |= 0x80; // set only bit 7 if hblank + ret |= 0x80; // set only bit 7 if hblank } return ret; @@ -317,16 +317,16 @@ WRITE8_MEMBER(itt3030_state::bank_w) int bank = 0; m_bank = data>>4; - if (m_bank & 1) // bank 8 + if (m_bank & 1) // bank 8 { bank = 8; } else { - bank = m_bank >> 1; + bank = m_bank >> 1; } -// printf("bank_w: new value %02x, m_bank %x, bank %x\n", data, m_bank, bank); +// printf("bank_w: new value %02x, m_bank %x, bank %x\n", data, m_bank, bank); m_48kbank->set_bank(bank); } @@ -376,10 +376,10 @@ static ADDRESS_MAP_START( itt3030_map, AS_PROGRAM, 8, itt3030_state ) ADDRESS_MAP_END static ADDRESS_MAP_START( lower48_map, AS_PROGRAM, 8, itt3030_state ) - AM_RANGE(0x00000, 0x7ffff) AM_READWRITE(bankl_r, bankl_w) // pages 0-7 + AM_RANGE(0x00000, 0x7ffff) AM_READWRITE(bankl_r, bankl_w) // pages 0-7 AM_RANGE(0x80000, 0x807ff) AM_ROM AM_REGION("maincpu", 0) // begin "page 8" AM_RANGE(0x80800, 0x80fff) AM_ROM AM_REGION("maincpu", 0) - AM_RANGE(0x81000, 0x810ff) AM_RAM AM_MIRROR(0x100) // only 256 bytes, but ROM also clears 11xx? + AM_RANGE(0x81000, 0x810ff) AM_RAM AM_MIRROR(0x100) // only 256 bytes, but ROM also clears 11xx? AM_RANGE(0x83000, 0x83fff) AM_RAM AM_SHARE("vram") ADDRESS_MAP_END @@ -396,7 +396,7 @@ ADDRESS_MAP_END READ8_MEMBER(itt3030_state::kbd_fifo_r) { - return m_kbdmcu->upi41_master_r(space, 0); // offset 0 is data, 1 is status + return m_kbdmcu->upi41_master_r(space, 0); // offset 0 is data, 1 is status } READ8_MEMBER(itt3030_state::kbd_matrix_r) @@ -407,7 +407,7 @@ READ8_MEMBER(itt3030_state::kbd_matrix_r) WRITE8_MEMBER(itt3030_state::kbd_matrix_w) { ioport_port *ports[16] = { m_keyrow1, m_keyrow2, m_keyrow3, m_keyrow4, m_keyrow5, m_keyrow6, m_keyrow7, m_keyrow8, m_keyrow9, - m_keyrow10, m_keyrow11, m_keyrow12, m_keyrow13, m_keyrow14, m_keyrow15, m_keyrow16 }; + m_keyrow10, m_keyrow11, m_keyrow12, m_keyrow13, m_keyrow14, m_keyrow15, m_keyrow16 }; int col_masks[8] = { 1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80 }; int tmp_read; @@ -424,7 +424,7 @@ WRITE8_MEMBER(itt3030_state::kbd_matrix_w) } // Schematics say: -// Port 1 goes to the keyboard matrix. +// Port 1 goes to the keyboard matrix. // bits 0-3 select matrix rows, bits 4-6 choose column to read, bit 7 clocks the process (rising edge strobes the row, falling edge reads the data) // T0 is the key matrix return // Port 2 bit 2 is shown as "IRQ" on the schematics, and the code does a lot with it as well (debug?) @@ -451,7 +451,7 @@ static INPUT_PORTS_START( itt3030 ) PORT_START("ROW3") PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) - PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') // actually UK pound symbol + PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('#') // actually UK pound symbol PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_S) PORT_CHAR('s') PORT_CHAR('S') PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') @@ -499,21 +499,21 @@ static INPUT_PORTS_START( itt3030 ) PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR(';') PORT_START("ROW10") - PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_F9) + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_F9) PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=') PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR(':') PORT_START("ROW11") - PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_F10) + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME(UTF8_RIGHT) PORT_CODE(KEYCODE_F10) PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_MINUS) PORT_CHAR('@') PORT_CHAR('?') PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('<') PORT_CHAR('>') PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_COLON) PORT_CHAR('[') PORT_CHAR('{') PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('-') PORT_CHAR('`') PORT_START("ROW12") - PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_F11) PORT_CHAR(27) + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("Esc") PORT_CODE(KEYCODE_F11) PORT_CHAR(27) PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR('/') PORT_CHAR('\\') PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_CHAR('+') PORT_CHAR('*') PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(']') PORT_CHAR('}') @@ -523,11 +523,11 @@ static INPUT_PORTS_START( itt3030 ) PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(R)") PORT_CODE(KEYCODE_F12) PORT_CHAR('=') PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('~') PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER) PORT_CHAR(13) - PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_CHAR('^') // PC doesn't have 3 keys to the right of L, so we sub DEL for the 3rd one + PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL) PORT_CHAR('^') // PC doesn't have 3 keys to the right of L, so we sub DEL for the 3rd one PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_CODE(KEYCODE_SPACE) PORT_CHAR(' ') PORT_START("ROW14") - PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(CL)") PORT_CODE(KEYCODE_F13) PORT_CHAR(4) // produces control-D always + PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_KEYBOARD) PORT_NAME("(CL)") PORT_CODE(KEYCODE_F13) PORT_CHAR(4) // produces control-D always PORT_BIT(0x001e, IP_ACTIVE_HIGH, IPT_UNUSED) PORT_START("ROW15") @@ -563,7 +563,7 @@ void itt3030_state::machine_start() save_item(NAME(m_kbdclk)); save_item(NAME(m_kbdread)); - m_kbdclk = 0; // must be initialized here b/c mcs48_reset() causes write of 0xff to all ports + m_kbdclk = 0; // must be initialized here b/c mcs48_reset() causes write of 0xff to all ports } void itt3030_state::machine_reset() @@ -576,7 +576,7 @@ void itt3030_state::machine_reset() } FLOPPY_FORMATS_MEMBER( itt3030_state::itt3030_floppy_formats ) - FLOPPY_ITT3030_FORMAT + FLOPPY_ITT3030_FORMAT FLOPPY_FORMATS_END @@ -587,8 +587,8 @@ SLOT_INTERFACE_END static struct tms9927_interface crtc_intf = { - 16, // pixels per video memory address - NULL // "self-load data"? + 16, // pixels per video memory address + NULL // "self-load data"? }; static MACHINE_CONFIG_START( itt3030, itt3030_state ) @@ -608,7 +608,7 @@ static MACHINE_CONFIG_START( itt3030, itt3030_state ) MCFG_SCREEN_UPDATE_DRIVER(itt3030_state, screen_update) MCFG_SCREEN_SIZE(80*8, 24*16) MCFG_SCREEN_VISIBLE_AREA(0, 80*8-1, 0, 24*16-1) - + /* devices */ MCFG_DEVICE_ADD("lowerbank", ADDRESS_MAP_BANK, 0) MCFG_DEVICE_PROGRAM_MAP(lower48_map) @@ -635,7 +635,7 @@ static MACHINE_CONFIG_START( itt3030, itt3030_state ) MCFG_SPEAKER_STANDARD_MONO( "mono" ) MCFG_SOUND_ADD( "beeper", BEEP, 0 ) MCFG_SOUND_ROUTE( ALL_OUTPUTS, "mono", 1.00 ) - + MACHINE_CONFIG_END @@ -655,4 +655,3 @@ ROM_START( itt3030 ) ROM_END GAME( 1982, itt3030, 0, itt3030, itt3030, driver_device, 0, ROT0, "ITT RFA", "ITT3030", GAME_NOT_WORKING | GAME_NO_SOUND ) - diff --git a/src/mess/drivers/mc1502.c b/src/mess/drivers/mc1502.c index d9bbde6107..01d53ad44d 100644 --- a/src/mess/drivers/mc1502.c +++ b/src/mess/drivers/mc1502.c @@ -83,8 +83,8 @@ TIMER_CALLBACK_MEMBER(mc1502_state::keyb_signal_callback) key |= ioport("Y10")->read(); key |= ioport("Y11")->read(); key |= ioport("Y12")->read(); -// DBG_LOG(1,"mc1502_k_s_c",("= %02X (%d) %s\n", key, m_kbd.pulsing, -// (key || m_kbd.pulsing) ? " will IRQ" : "")); +// DBG_LOG(1,"mc1502_k_s_c",("= %02X (%d) %s\n", key, m_kbd.pulsing, +// (key || m_kbd.pulsing) ? " will IRQ" : "")); /* If a key is pressed and we're not pulsing yet, start pulsing the IRQ1; @@ -110,10 +110,10 @@ WRITE8_MEMBER(mc1502_state::mc1502_ppi_porta_w) WRITE8_MEMBER(mc1502_state::mc1502_ppi_portb_w) { -// DBG_LOG(2,"mc1502_ppi_portb_w",("( %02X )\n", data)); +// DBG_LOG(2,"mc1502_ppi_portb_w",("( %02X )\n", data)); m_ppi_portb = data; machine().device("pit8253")->gate2_w(BIT(data, 0)); -// mc1502_speaker_set_spkrdata(BIT(data, 1)); +// mc1502_speaker_set_spkrdata(BIT(data, 1)); m_centronics->strobe_w(BIT(data, 2)); m_centronics->autofeed_w(BIT(data, 3)); m_centronics->init_prime_w(BIT(data, 4)); @@ -124,7 +124,7 @@ WRITE8_MEMBER(mc1502_state::mc1502_ppi_portb_w) // bit 3: i8251 SYNDET pin triggers NMI (default = 1 = no) WRITE8_MEMBER(mc1502_state::mc1502_ppi_portc_w) { -// DBG_LOG(2,"mc1502_ppi_portc_w",("( %02X )\n", data)); +// DBG_LOG(2,"mc1502_ppi_portc_w",("( %02X )\n", data)); m_ppi_portc = data & 15; } @@ -154,8 +154,8 @@ READ8_MEMBER(mc1502_state::mc1502_ppi_portc_r) data = ( data & ~0x20 ) | ( timer2_output ? 0x20 : 0x00 ); data = ( data & ~0x10 ) | ( (BIT(m_ppi_portb, 1) && timer2_output) ? 0x10 : 0x00 ); -// DBG_LOG(2,"mc1502_ppi_portc_r",("= %02X (tap_val %f t2out %d) at %s\n", -// data, tap_val, timer2_output, machine().describe_context())); +// DBG_LOG(2,"mc1502_ppi_portc_r",("= %02X (tap_val %f t2out %d) at %s\n", +// data, tap_val, timer2_output, machine().describe_context())); return data; } @@ -176,7 +176,7 @@ READ8_MEMBER(mc1502_state::mc1502_kppi_porta_r) if (m_kbd.mask & 0x0400) { key |= ioport("Y11")->read(); } if (m_kbd.mask & 0x0800) { key |= ioport("Y12")->read(); } key ^= 0xff; -// DBG_LOG(2,"mc1502_kppi_porta_r",("= %02X\n", key)); +// DBG_LOG(2,"mc1502_kppi_porta_r",("= %02X\n", key)); return key; } @@ -188,14 +188,14 @@ WRITE8_MEMBER(mc1502_state::mc1502_kppi_portb_w) m_kbd.mask |= 1 << 11; else m_kbd.mask &= ~(1 << 11); -// DBG_LOG(2,"mc1502_kppi_portb_w",("( %02X -> %04X )\n", data, m_kbd.mask)); +// DBG_LOG(2,"mc1502_kppi_portb_w",("( %02X -> %04X )\n", data, m_kbd.mask)); } WRITE8_MEMBER(mc1502_state::mc1502_kppi_portc_w) { m_kbd.mask &= ~(7 << 8); m_kbd.mask |= ((data ^ 7) & 7) << 8; -// DBG_LOG(2,"mc1502_kppi_portc_w",("( %02X -> %04X )\n", data, m_kbd.mask)); +// DBG_LOG(2,"mc1502_kppi_portc_w",("( %02X -> %04X )\n", data, m_kbd.mask)); } I8255_INTERFACE( mc1502_ppi8255_interface_1 ) @@ -244,7 +244,7 @@ WRITE_LINE_MEMBER(mc1502_state::mc1502_pit8253_out1_changed) WRITE_LINE_MEMBER(mc1502_state::mc1502_pit8253_out2_changed) { -// mc1502_speaker_set_input( state ); +// mc1502_speaker_set_input( state ); m_cassette->output(state ? 1 : -1); } @@ -311,9 +311,9 @@ MACHINE_RESET_MEMBER( mc1502_state, mc1502 ) static ADDRESS_MAP_START( mc1502_map, AS_PROGRAM, 8, mc1502_state ) ADDRESS_MAP_UNMAP_HIGH - AM_RANGE(0x00000, 0x97fff) AM_RAM /* 96K on mainboard + 512K on extension card */ + AM_RANGE(0x00000, 0x97fff) AM_RAM /* 96K on mainboard + 512K on extension card */ AM_RANGE(0xc0000, 0xfbfff) AM_NOP -// AM_RANGE(0xe8000, 0xeffff) AM_ROM /* BASIC */ +// AM_RANGE(0xe8000, 0xeffff) AM_ROM /* BASIC */ AM_RANGE(0xfc000, 0xfffff) AM_ROM ADDRESS_MAP_END @@ -379,7 +379,7 @@ static MACHINE_CONFIG_START( mc1502, mc1502_state ) MCFG_CASSETTE_ADD( "cassette", mc1502_cassette_interface ) MCFG_SOFTWARE_LIST_ADD("flop_list","mc1502_flop") -// MCFG_SOFTWARE_LIST_ADD("cass_list","mc1502_cass") +// MCFG_SOFTWARE_LIST_ADD("cass_list","mc1502_cass") /* internal ram */ MCFG_RAM_ADD(RAM_TAG) diff --git a/src/mess/drivers/mkit09.c b/src/mess/drivers/mkit09.c index 47aec2cb70..c5df7239ac 100644 --- a/src/mess/drivers/mkit09.c +++ b/src/mess/drivers/mkit09.c @@ -142,7 +142,7 @@ READ8_MEMBER( mkit09_state::pa_r ) sprintf(kbdrow,"X%d",m_keydata); return ioport(kbdrow)->read(); } - + return 0xff; } diff --git a/src/mess/drivers/myvision.c b/src/mess/drivers/myvision.c index 7b2f5eaf06..175b4742df 100644 --- a/src/mess/drivers/myvision.c +++ b/src/mess/drivers/myvision.c @@ -17,8 +17,8 @@ - Add clickable artwork - Verify sound chip model - Verify exact TMS9918 model - - Verify clock crystal(s) - - Verify size of vram + - Verify clock crystal(s) + - Verify size of vram ****************************************************************************/ @@ -225,12 +225,12 @@ WRITE8_MEMBER( myvision_state::ay_port_b_w ) static const ay8910_interface myvision_ay8910_interface = { - AY8910_LEGACY_OUTPUT, - AY8910_DEFAULT_LOADS, - DEVCB_DRIVER_MEMBER(myvision_state, ay_port_a_r), - DEVCB_DRIVER_MEMBER(myvision_state, ay_port_b_r), - DEVCB_DRIVER_MEMBER(myvision_state, ay_port_a_w), - DEVCB_DRIVER_MEMBER(myvision_state, ay_port_b_w) + AY8910_LEGACY_OUTPUT, + AY8910_DEFAULT_LOADS, + DEVCB_DRIVER_MEMBER(myvision_state, ay_port_a_r), + DEVCB_DRIVER_MEMBER(myvision_state, ay_port_b_r), + DEVCB_DRIVER_MEMBER(myvision_state, ay_port_a_w), + DEVCB_DRIVER_MEMBER(myvision_state, ay_port_b_w) }; @@ -271,4 +271,3 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ COMP( 1983, myvision, 0, 0, myvision, myvision, driver_device, 0, "Nichibutsu", "My Vision (KH-1000)", 0 ) - diff --git a/src/mess/drivers/next.c b/src/mess/drivers/next.c index c1188f2ce9..5e10d19bc0 100644 --- a/src/mess/drivers/next.c +++ b/src/mess/drivers/next.c @@ -966,7 +966,7 @@ static MACHINE_CONFIG_START( next_base, next_state ) // devices MCFG_NSCSI_BUS_ADD("scsibus") MCFG_MCCS1850_ADD("rtc", XTAL_32_768kHz, - line_cb_t(), line_cb_t(), line_cb_t()) + line_cb_t(), line_cb_t(), line_cb_t()) MCFG_SCC8530_ADD("scc", XTAL_25MHz, line_cb_t(FUNC(next_state::scc_irq), static_cast(owner))) MCFG_NEXTKBD_ADD("keyboard", line_cb_t(FUNC(next_state::keyboard_irq), static_cast(owner)), diff --git a/src/mess/drivers/pc.c b/src/mess/drivers/pc.c index cb3b2664fc..0168598fc3 100644 --- a/src/mess/drivers/pc.c +++ b/src/mess/drivers/pc.c @@ -1075,7 +1075,7 @@ static MACHINE_CONFIG_START( t1000hx, tandy_pc_state ) MCFG_CPU_PROGRAM_MAP(tandy1000_map) \ MCFG_CPU_IO_MAP(tandy1000_io) \ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pc_state, pc_frame_interrupt, "pcvideo_t1000:screen", 0, 1) //with this line commented out, it boots further though keyboard doesn't work, obviously - + MCFG_MACHINE_START_OVERRIDE(tandy_pc_state,pc) MCFG_MACHINE_RESET_OVERRIDE(pc_state,pc) @@ -1144,8 +1144,8 @@ static MACHINE_CONFIG_START( t1000_16, tandy_pc_state ) MCFG_CPU_PROGRAM_MAP(tandy1000_16_map) \ MCFG_CPU_IO_MAP(tandy1000_16_io) \ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pc_state, pc_frame_interrupt, "pcvideo_t1000:screen", 0, 1) - - + + MCFG_MACHINE_START_OVERRIDE(tandy_pc_state,pc) MCFG_MACHINE_RESET_OVERRIDE(tandy_pc_state,tandy1000rl) @@ -1215,8 +1215,8 @@ static MACHINE_CONFIG_START( t1000_286, tandy_pc_state ) MCFG_CPU_PROGRAM_MAP(tandy1000_286_map) \ MCFG_CPU_IO_MAP(tandy1000_286_io) \ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pc_state, pc_frame_interrupt, "pcvideo_t1000:screen", 0, 1) - - + + MCFG_MACHINE_START_OVERRIDE(pc_state,pc) MCFG_MACHINE_RESET_OVERRIDE(pc_state,pc) @@ -1302,7 +1302,7 @@ static MACHINE_CONFIG_START( ibmpcjr, tandy_pc_state ) MCFG_CPU_PROGRAM_MAP(ibmpcjr_map) \ MCFG_CPU_IO_MAP(ibmpcjr_io) \ MCFG_TIMER_DRIVER_ADD_SCANLINE("scantimer", pc_state, pcjr_frame_interrupt, "pcvideo_pcjr:screen", 0, 1) //with this line commented out, it boots further though keyboard doesn't work, obviously - + MCFG_MACHINE_START_OVERRIDE(pc_state,pcjr) MCFG_MACHINE_RESET_OVERRIDE(pc_state,pcjr) diff --git a/src/mess/drivers/poisk1.c b/src/mess/drivers/poisk1.c index 3fa13a9396..1614f8e637 100644 --- a/src/mess/drivers/poisk1.c +++ b/src/mess/drivers/poisk1.c @@ -99,7 +99,7 @@ READ8_MEMBER(p1_state::p1_ppi_portb_r) if (m_kbpoll_mask & 0x40) { key &= ioport("Y7")->read(); } if (m_kbpoll_mask & 0x80) { key &= ioport("Y8")->read(); } ret = key & 0xff; -// DBG_LOG(1,"p1_ppi_portb_r",("= %02X\n", ret)); +// DBG_LOG(1,"p1_ppi_portb_r",("= %02X\n", ret)); return ret; } @@ -143,27 +143,27 @@ WRITE8_MEMBER(p1_state::p1_ppi2_portb_w) I8255_INTERFACE( p1_ppi8255_interface_1 ) { -/*60H*/ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi_porta_r), +/*60H*/ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi_porta_r), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi_porta_w), -/*69H*/ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi_portb_r), +/*69H*/ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi_portb_r), DEVCB_NULL, -/*6AH*/ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi_portc_r), +/*6AH*/ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi_portc_r), DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi_portc_w) }; I8255_INTERFACE( p1_ppi8255_interface_2 ) { -/*68H*/ DEVCB_NULL, +/*68H*/ DEVCB_NULL, DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi2_porta_w), -/*61H*/ DEVCB_NULL, +/*61H*/ DEVCB_NULL, DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi2_portb_w), -/*62H*/ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi2_portc_r), +/*62H*/ DEVCB_DEVICE_MEMBER(DEVICE_SELF_OWNER, p1_state, p1_ppi2_portc_r), DEVCB_NULL }; READ8_MEMBER(p1_state::p1_ppi_r) { -// DBG_LOG(1,"p1ppi",("R %.2x\n", 0x60+offset)); +// DBG_LOG(1,"p1ppi",("R %.2x\n", 0x60+offset)); switch (offset) { case 0: return m_ppi8255n1->read(space, 0); @@ -185,7 +185,7 @@ READ8_MEMBER(p1_state::p1_ppi_r) WRITE8_MEMBER(p1_state::p1_ppi_w) { -// DBG_LOG(1,"p1ppi",("W %.2x $%02x\n", 0x60+offset, data)); +// DBG_LOG(1,"p1ppi",("W %.2x $%02x\n", 0x60+offset, data)); switch (offset) { case 0: return m_ppi8255n1->write(space, 0, data); diff --git a/src/mess/drivers/prof80.c b/src/mess/drivers/prof80.c index d4e71be1d7..ae2f78f4e6 100644 --- a/src/mess/drivers/prof80.c +++ b/src/mess/drivers/prof80.c @@ -15,7 +15,7 @@ TODO: - - floppy Err on A: Select + - floppy Err on A: Select - NE555 timeout is 10x too high - grip31 does not work - UNIO card (Z80-STI, Z80-SIO, 2x centronics) diff --git a/src/mess/drivers/rainbow.c b/src/mess/drivers/rainbow.c index 57ef93b8a3..c93ad4eff9 100644 --- a/src/mess/drivers/rainbow.c +++ b/src/mess/drivers/rainbow.c @@ -2,57 +2,57 @@ DEC Rainbow 100 Driver-in-progress by R. Belmont and Miodrag Milanovic. - Portions (2013) by Karl-Ludwig Deisenhofer (VT video, floppy, preliminary keyboard, DIP switches). + Portions (2013) by Karl-Ludwig Deisenhofer (VT video, floppy, preliminary keyboard, DIP switches). STATE AS OF DECEMBER 2013 -------------------------- - - FLOPPY TIMING: 'wd17xx_complete_command' * must * be hard wired to about 13 usecs. - Line 1063 in 'wd17xx.c' has to be changed (until legacy code here is removed): - - w->timer_cmd->adjust(attotime::from_usec(usecs)); - + w->timer_cmd->adjust(attotime::from_usec(13)); + - FLOPPY TIMING: 'wd17xx_complete_command' * must * be hard wired to about 13 usecs. + Line 1063 in 'wd17xx.c' has to be changed (until legacy code here is removed): + - w->timer_cmd->adjust(attotime::from_usec(usecs)); + + w->timer_cmd->adjust(attotime::from_usec(13)); - WORKAROUND AVAILABLE: keyboard emulation incomplete (inhibits the system from booting with ERROR 50 on cold or ERROR 13 on warm boot). - - NOT WORKING: serial (ERROR 60). + - NOT WORKING: serial (ERROR 60). - NOT WORKING: printer interface (ERROR 40). Like error 60 not mission-critical. - NON-CRITICAL: watchdog logic (triggered after 108 ms without interrupts on original machine) still does not work as intended. - Timer is reset by TWO sources: the VERT INT L from the DC012, or the MHFU ENB L from the enable flip-flop. - The MHFU gets active if the 8088 has not acknowledged a video processor interrupt within approx. 108 milliseconds. - - BIOS assumes a power-up reset if MHFU detection is disabled - and assumes a MHFU reset if MHFU detection is ENABLED. - - As there is no reset switch, only a limited software reset exists on a real DEC-100 (CTRL-SETUP within SETUP). + Timer is reset by TWO sources: the VERT INT L from the DC012, or the MHFU ENB L from the enable flip-flop. + The MHFU gets active if the 8088 has not acknowledged a video processor interrupt within approx. 108 milliseconds. + + BIOS assumes a power-up reset if MHFU detection is disabled - and assumes a MHFU reset if MHFU detection is ENABLED. + + As there is no reset switch, only a limited software reset exists on a real DEC-100 (CTRL-SETUP within SETUP). - TO BE IMPLEMENTED AS SLOT DEVICES (for now, DIP settings affect 'system_parameter_r' only and are disabled): * Color graphics option (uses NEC upd7220 GDC) * Extended communication option (same as BUNDLE_OPTION ?) - OTHER UPGRADES (NEC_V20 should be easy, the TURBOW is harder to come by) - * Suitable Solutions TURBOW286: 12 Mhz, 68-pin, low power AMD N80L286-12 and WAYLAND/EDSUN EL286-88-10-B ( 80286 to 8088 Processor Signal Converter ) - plus DC 7174 or DT 7174 (barely readable). Add-on card, replaces main 8088 cpu (via ribbon cable). Altered BOOT ROM labeled 'TBSS1.3 - 3ED4'. + * Suitable Solutions TURBOW286: 12 Mhz, 68-pin, low power AMD N80L286-12 and WAYLAND/EDSUN EL286-88-10-B ( 80286 to 8088 Processor Signal Converter ) + plus DC 7174 or DT 7174 (barely readable). Add-on card, replaces main 8088 cpu (via ribbon cable). Altered BOOT ROM labeled 'TBSS1.3 - 3ED4'. - * NEC_V20 (requires modded BOOT ROM because of - at least 2 - hard coded timing loops): - 100A: 100B/100+: 100B+ ALTERNATE RECOMMENDATION (fixes RAM size auto-detection problems when V20 is in place. - Tested on a 30+ year old live machine. Your mileage may vary) + * NEC_V20 (requires modded BOOT ROM because of - at least 2 - hard coded timing loops): + 100A: 100B/100+: 100B+ ALTERNATE RECOMMENDATION (fixes RAM size auto-detection problems when V20 is in place. + Tested on a 30+ year old live machine. Your mileage may vary) - Location Data Location Data Loc.|Data - .... .. .... .. ------------------ 00C6 46 [ increases 'wait for Z80' from approx. 27,5 ms (old value 40) to 30,5 ms ] - .... .. .... .. ------------------ 0303 00 [ disable CHECKSUM ] - 043F 64 072F 64 <-----------------> 072F 73 [ increases minimum cycle time from 2600 (64) to 3000 ms (73) ] - 067D 20 0B36 20 <-----------------> 0B36 20 [ USE A VALUE OF 20 FOR THE NEC - as in the initial patch! CHANGES CAUSE VFR-ERROR 10 ] - 1FFE 2B 3FFE 1B (BIOS CHECKSUM) - 1FFF 70 3FFF 88 (BIOS CHECKSUM) + Location Data Location Data Loc.|Data + .... .. .... .. ------------------ 00C6 46 [ increases 'wait for Z80' from approx. 27,5 ms (old value 40) to 30,5 ms ] + .... .. .... .. ------------------ 0303 00 [ disable CHECKSUM ] + 043F 64 072F 64 <-----------------> 072F 73 [ increases minimum cycle time from 2600 (64) to 3000 ms (73) ] + 067D 20 0B36 20 <-----------------> 0B36 20 [ USE A VALUE OF 20 FOR THE NEC - as in the initial patch! CHANGES CAUSE VFR-ERROR 10 ] + 1FFE 2B 3FFE 1B (BIOS CHECKSUM) + 1FFF 70 3FFF 88 (BIOS CHECKSUM) - => the 'leaked' DOS 3.10 Beta -for Rainbow- 'should not be used' on rigs with NEC V20. It possibly wasn't tested, but boots and runs well. - => on the NEC, auto detection (of option RAM) fails with the original V20 patch (above, left) - Expect RAM related system crashes after swapping CPUs and altering physical RAM _afterwards_. - Hard coded CPU loops are to blame. Try values from the alternate patch (right). - => AAD/AAM - Intel 8088 honors the second byte (operand), NEC V20 ignores it and always uses base 0Ah (10). - => UNDOCUMENTED: NEC V20 does not have "POP CS" (opcode 0F). There are more differences (opcode D6; the 2 byte POP: 8F Cx; FF Fx instructions) - Commercial programs had to be patched back then (as was the case with Loderunner for PC). - => NEW OPCODES: REPC, REPNC, CHKIND, PREPARE, DISPOSE; BCD string operations (ADD4S, CMP4S, SUB4S), bit-ops (NOT, SET, TEST, ROL4, ROR4) - WARNING: undoc'd opcodes, INS, EXT and 8080 behaviour are unemulated yet! MESS' CPU source has up-to-date info. + => the 'leaked' DOS 3.10 Beta -for Rainbow- 'should not be used' on rigs with NEC V20. It possibly wasn't tested, but boots and runs well. + => on the NEC, auto detection (of option RAM) fails with the original V20 patch (above, left) + Expect RAM related system crashes after swapping CPUs and altering physical RAM _afterwards_. + Hard coded CPU loops are to blame. Try values from the alternate patch (right). + => AAD/AAM - Intel 8088 honors the second byte (operand), NEC V20 ignores it and always uses base 0Ah (10). + => UNDOCUMENTED: NEC V20 does not have "POP CS" (opcode 0F). There are more differences (opcode D6; the 2 byte POP: 8F Cx; FF Fx instructions) + Commercial programs had to be patched back then (as was the case with Loderunner for PC). + => NEW OPCODES: REPC, REPNC, CHKIND, PREPARE, DISPOSE; BCD string operations (ADD4S, CMP4S, SUB4S), bit-ops (NOT, SET, TEST, ROL4, ROR4) + WARNING: undoc'd opcodes, INS, EXT and 8080 behaviour are unemulated yet! MESS' CPU source has up-to-date info. Meaning of Diagnostics LEDs (from PC100ESV1.PDF found, e.g., on ftp://ftp.update.uu.se/pub/rainbow/doc/rainbow-docs/ @@ -138,7 +138,7 @@ PCB # 5416206 / 5016205-01C1: | ROM (4K) ...J7... | ...J9 = RX50 | |------------PCB# 5416206 / 5016205-01C1-------------| NOTES -W5 + W6 are out when 16K x 8 EPROMS are used +W5 + W6 are out when 16K x 8 EPROMS are used / W5 + W6 installed => 32 K x 8 EPROMs (pin 27 = A14) W13, W14, W15, W18 = for manufacturing tests. @@ -146,12 +146,12 @@ W13, W14, W15, W18 = for manufacturing tests. => W18 pulls DSR to ground and affects 8251A - port $11 (bit 7) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! DO NOT SHORT JUMPER / CONNECTOR [W90] ON LIVE HARDWARE !! -!! !! +!! DO NOT SHORT JUMPER / CONNECTOR [W90] ON LIVE HARDWARE !! +!! !! !! WARNING: CIRCUIT DAMAGE could occur if this jumper is !! -!! set by end users. See PDF document AA-V523A-TV. !! -!! !! -!! W90 connects to pin 2 (Voltage Bias on PWR connector J8)!! +!! set by end users. See PDF document AA-V523A-TV. !! +!! !! +!! W90 connects to pin 2 (Voltage Bias on PWR connector J8)!! !! and is designed FOR ===> FACTORY TESTS OF THE PSU <=== !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -161,8 +161,8 @@ W17 pulls J1 serial port pin 1 to GND when set (chassis to logical GND). ****************************************************************************/ // Workarounds DO NOT APPLY to the 190-B ROM. Only enable when compiling the 'rainbow' driver - -//#define FORCE_RAINBOW_100_LOGO -#define KBD_DELAY 875 // (debounce delay). Recommended: 875. +//#define FORCE_RAINBOW_100_LOGO +#define KBD_DELAY 875 // (debounce delay). Recommended: 875. #include "emu.h" #include "cpu/i86/i86.h" @@ -310,7 +310,7 @@ public: void rainbow_state::machine_start() -{ +{ m_image[0] = subdevice(FLOPPY_0); m_image[1] = subdevice(FLOPPY_1); m_image[2] = subdevice(FLOPPY_2); @@ -329,13 +329,13 @@ void rainbow_state::machine_start() UINT8 *rom = memregion("maincpu")->base(); - -#ifdef FORCE_RAINBOW_100_LOGO - rom[0xf4174]=0xeb; // jmps RAINBOW100_LOGO__loc_33D - rom[0xf4175]=0x08; - rom[0xf4000 + 0x364a]= 0x0a; - rom[0xf4384]=0xeb; // JMPS => BOOT80 +#ifdef FORCE_RAINBOW_100_LOGO + rom[0xf4174]=0xeb; // jmps RAINBOW100_LOGO__loc_33D + rom[0xf4175]=0x08; + + rom[0xf4000 + 0x364a]= 0x0a; + rom[0xf4384]=0xeb; // JMPS => BOOT80 #endif // Enables PORT90_W + PORT91_W via BIOS call (offset +$21 in HIGH ROM) @@ -382,12 +382,12 @@ static ADDRESS_MAP_START( rainbow8088_map, AS_PROGRAM, 8, rainbow_state) // - ED000 - ED0FF is the area the _DEC-100-B BIOS_ accesses - and checks. // - Specs say that the CPU has direct access to volatile RAM only. - // So NVRAM is hidden now and loads & saves are triggered within the + // So NVRAM is hidden now and loads & saves are triggered within the // 'diagnostic_w' handler (similar to real hardware). - // - Address bits 8-12 are ignored (-> AM_MIRROR). - AM_RANGE(0xed000, 0xed0ff) AM_RAM AM_SHARE("vol_ram") AM_MIRROR(0x1f00) - AM_RANGE(0xed100, 0xed1ff) AM_RAM AM_SHARE("nvram") + // - Address bits 8-12 are ignored (-> AM_MIRROR). + AM_RANGE(0xed000, 0xed0ff) AM_RAM AM_SHARE("vol_ram") AM_MIRROR(0x1f00) + AM_RANGE(0xed100, 0xed1ff) AM_RAM AM_SHARE("nvram") AM_RANGE(0xee000, 0xeffff) AM_RAM AM_SHARE("p_ram") AM_RANGE(0xf0000, 0xfffff) AM_ROM @@ -410,8 +410,8 @@ static ADDRESS_MAP_START( rainbow8088_io , AS_IO, 8, rainbow_state) AM_RANGE (0x0a, 0x0a) AM_READWRITE(diagnostic_r, diagnostic_w) - // 0x0C Video processor DC012 - AM_RANGE (0x0c, 0x0c) AM_DEVWRITE("vt100_video", rainbow_video_device, dc012_w) + // 0x0C Video processor DC012 + AM_RANGE (0x0c, 0x0c) AM_DEVWRITE("vt100_video", rainbow_video_device, dc012_w) // TODO: unmapped [0e] : PRINTER BIT RATE REGISTER (WO) @@ -420,7 +420,7 @@ static ADDRESS_MAP_START( rainbow8088_io , AS_IO, 8, rainbow_state) // UNMAPPED: // 0x20 - 0x2f ***** EXTENDED COMM. OPTION (option select 1)- for example: - // 0x27 (RESET EXTENDED COMM OPTION) - OUT 27 @ offset 1EA7 + // 0x27 (RESET EXTENDED COMM OPTION) - OUT 27 @ offset 1EA7 // 0x40 COMMUNICATIONS DATA REGISTER (MPSC) // 0x41 PRINTER DATA REGISTER (MPSC) @@ -428,20 +428,20 @@ static ADDRESS_MAP_START( rainbow8088_io , AS_IO, 8, rainbow_state) // 0x43 PRINTER CONTROL / STATUS REGISTER (MPSC) // 0x50 - 0xf ***** OPTIONAL COLOR GRAPHICS - for example: - // 0x50 (RESET_GRAPH. OPTION) - OUT 50 @ offsets F5EB5 + F5EB9 + // 0x50 (RESET_GRAPH. OPTION) - OUT 50 @ offsets F5EB5 + F5EB9 // =========================================================== - // TODO: hard disc emulation! - // ------ Rainbow uses 'WD 1010 AL' (Western Digital 1983) - // Register compatible to WD2010 (present in MESS) - // R/W REGISTERS 60 - 68 (?) + // TODO: hard disc emulation! + // ------ Rainbow uses 'WD 1010 AL' (Western Digital 1983) + // Register compatible to WD2010 (present in MESS) + // R/W REGISTERS 60 - 68 (?) // =========================================================== // HARD DISC SIZES AND LIMITS - // HARDWARE: - // Controller has a built-in limit of 8 heads / 1024 cylinders (67 MB). Standard geometry is 4 surfaces. - // SOFTWARE: the DEC boot loader (and FDISK from DOS 3.10) initially allowed a maximum hard disc size of 20 MB. - // - DOS 3 has a 1024 cylinder limit (32 MB). - // - the custom boot loader that comes with 'WUTIL 3.2' allows 117 MB and 8 surfaces. + // HARDWARE: + // Controller has a built-in limit of 8 heads / 1024 cylinders (67 MB). Standard geometry is 4 surfaces. + // SOFTWARE: the DEC boot loader (and FDISK from DOS 3.10) initially allowed a maximum hard disc size of 20 MB. + // - DOS 3 has a 1024 cylinder limit (32 MB). + // - the custom boot loader that comes with 'WUTIL 3.2' allows 117 MB and 8 surfaces. AM_RANGE (0x68, 0x68) AM_READ(hd_status_68_r) AM_RANGE (0x90, 0x90) AM_WRITE(PORT90_W) @@ -472,7 +472,7 @@ ADDRESS_MAP_END static INPUT_PORTS_START( rainbow100b_in ) /* DIP switches */ PORT_START("MONITOR TYPE") - PORT_DIPNAME( 0x03, 0x03, "MONOCHROME MONITOR") + PORT_DIPNAME( 0x03, 0x03, "MONOCHROME MONITOR") PORT_DIPSETTING( 0x01, "PAPER WHITE" ) PORT_DIPSETTING( 0x02, "GREEN" ) PORT_DIPSETTING( 0x03, "AMBER" ) @@ -516,25 +516,25 @@ static INPUT_PORTS_START( rainbow100b_in ) PORT_DIPNAME( 0x08, 0x08, "W15 (FACTORY TEST C, LEAVE OFF)") PORT_TOGGLE PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - // DSR = 1 when switch is OFF - see i8251.c (status_r) + // DSR = 1 when switch is OFF - see i8251.c (status_r) PORT_START("W18") - PORT_DIPNAME( 0x01, 0x00, "W18 (FACTORY TEST D, LEAVE OFF) (8251A: DSR)") PORT_TOGGLE + PORT_DIPNAME( 0x01, 0x00, "W18 (FACTORY TEST D, LEAVE OFF) (8251A: DSR)") PORT_TOGGLE PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x01, DEF_STR( On ) ) PORT_WRITE_LINE_DEVICE_MEMBER("kbdser", i8251_device, write_dsr) - // J17 jumper on FDC controller board shifts drive select (experimental) - - PORT_START("FLOPPY CONTROLLER") + // J17 jumper on FDC controller board shifts drive select (experimental) - + PORT_START("FLOPPY CONTROLLER") PORT_DIPNAME( 0x02, 0x00, "J17 DRIVE SELECT (A => C and B => D)") PORT_TOGGLE PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) PORT_DIPSETTING( 0x02, DEF_STR( On ) ) INPUT_PORTS_END -// 800K native format (80 * 10). Also reads VT-180 disks and PC-DOS 360 k disks +// 800K native format (80 * 10). Also reads VT-180 disks and PC-DOS 360 k disks // ( both: 512 byte sectors, single sided, 9 sectors per track, 40 tracks ) static LEGACY_FLOPPY_OPTIONS_START( dec100_floppy ) - LEGACY_FLOPPY_OPTION( dec100_floppy, "td0", "Teledisk floppy disk image", td0_dsk_identify, td0_dsk_construct, td0_dsk_destruct, NULL ) - LEGACY_FLOPPY_OPTION( dec100_floppy, "img", "DEC Rainbow 100", basicdsk_identify_default, basicdsk_construct_default, NULL, + LEGACY_FLOPPY_OPTION( dec100_floppy, "td0", "Teledisk floppy disk image", td0_dsk_identify, td0_dsk_construct, td0_dsk_destruct, NULL ) + LEGACY_FLOPPY_OPTION( dec100_floppy, "img", "DEC Rainbow 100", basicdsk_identify_default, basicdsk_construct_default, NULL, HEADS([1]) TRACKS(40/[80]) SECTORS(9/[10]) @@ -543,7 +543,7 @@ static LEGACY_FLOPPY_OPTIONS_START( dec100_floppy ) FIRST_SECTOR_ID([1]) ) LEGACY_FLOPPY_OPTIONS_END - + void rainbow_state::machine_reset() { if (COLD_BOOT == 1) @@ -595,9 +595,9 @@ UINT32 rainbow_state::screen_update_rainbow(screen_device &screen, bitmap_ind16 m_crtc->palette_select( m_inp9->read() ); if ( m_SCREEN_BLANK ) - m_crtc->video_blanking(bitmap, cliprect); - else - m_crtc->video_update(bitmap, cliprect); + m_crtc->video_blanking(bitmap, cliprect); + else + m_crtc->video_update(bitmap, cliprect); return 0; } @@ -606,12 +606,12 @@ UINT32 rainbow_state::screen_update_rainbow(screen_device &screen, bitmap_ind16 // Unexpected low RAM sizes are an indication of option RAM (at worst: 128 K on board) failure. // While motherboard errors often render the system unbootable, bad option RAM (> 128 K) -// can be narrowed down with the Diagnostic Disk and codes from the 'Pocket Service Guide' +// can be narrowed down with the Diagnostic Disk and codes from the 'Pocket Service Guide' // EK-PC100-PS-002 (APPENDIX B.2.2); pc100ps2.pdf // ================================================================ // - Simulate floating bus for initial RAM detection - // FIXME: code valid ONLY within ROM section F4Exxx. -// +// // NOTE: MS-DOS 2.x unfortunately probes RAM in a similar way. // => SET OPTION RAM to 896 K for unknown applications (and DOS) <= // ================================================================ @@ -619,12 +619,12 @@ READ8_MEMBER(rainbow_state::floating_bus_r) { int pc = space.device().safe_pc(); - if ( ((pc & 0xFFF00) == 0xF4E00) && - ( m_maincpu->state_int(I8086_DS) >= m_inp8->read() ) - ) + if ( ((pc & 0xFFF00) == 0xF4E00) && + ( m_maincpu->state_int(I8086_DS) >= m_inp8->read() ) + ) { return (offset>>16) + 2; - } + } else return space.read_byte(offset); } @@ -694,11 +694,11 @@ WRITE8_MEMBER(rainbow_state::share_z80_w) // Until a full-blown hard-disc emulation evolves, deliver an error message: READ8_MEMBER(rainbow_state::hd_status_68_r) { - // Top 3 bits = status / error code + // Top 3 bits = status / error code // SEE -> W_INCHESTER__loc_80E // return 0xa0; // A0 : OK, DRIVE IS READY (!) - + return 0xe0; // => 21 DRIVE NOT READY (BIOS; when W is pressed on boot screen) } @@ -712,22 +712,22 @@ READ8_MEMBER(rainbow_state::system_parameter_r) ( 1 means NOT present ) */ // Hard coded value 0x2000 - see DIP switch setup! - return 0x0f - m_inp5->read() - - 0 // floppy is hard coded in emulator. - - m_inp7->read() + return 0x0f - m_inp5->read() + - 0 // floppy is hard coded in emulator. + - m_inp7->read() - ((m_inp8->read() > 0x2000) ? 8 : 0); } READ8_MEMBER(rainbow_state::comm_control_r) -{ -/* [02] COMMUNICATIONS STATUS REGISTER - PAGE 154 (**** READ **** ) - Used to read status of SERIAL port, IRQ line of each CPU, and MHFU logic enable signal. +{ +/* [02] COMMUNICATIONS STATUS REGISTER - PAGE 154 (**** READ **** ) + Used to read status of SERIAL port, IRQ line of each CPU, and MHFU logic enable signal. // What the specs says on how MHFU detection is disabled: -// 1. by first disabling interrupts with CLI -// 2. by writing 0x00 to port 0x10C (handled by 'dc012_w' in vtvideo) -// (3.) MHFU is re-enabled by writing to 0x0c (or automatically after STI - when under BIOS control ?) -*/ +// 1. by first disabling interrupts with CLI +// 2. by writing 0x00 to port 0x10C (handled by 'dc012_w' in vtvideo) +// (3.) MHFU is re-enabled by writing to 0x0c (or automatically after STI - when under BIOS control ?) +*/ // During boot phase 2, do not consider MHFU ENABLE. Prevents ERROR 16. int data; if (COLD_BOOT == 2) @@ -736,9 +736,9 @@ READ8_MEMBER(rainbow_state::comm_control_r) data = m_crtc->MHFU(1); return ( ( (data > 0) ? 0x00 : 0x20) |// (L): status of MHFU flag => bit pos.5 - ( (INT88) ? 0x00 : 0x40 ) | // (L) - ( (INTZ80) ? 0x00 : 0x80 ) // (L) - ); + ( (INT88) ? 0x00 : 0x40 ) | // (L) + ( (INTZ80) ? 0x00 : 0x80 ) // (L) + ); } WRITE8_MEMBER(rainbow_state::comm_control_w) @@ -765,9 +765,8 @@ WRITE8_MEMBER(rainbow_state::PORT90_W) m_KBD = 0; // reset previous command. - if(MOTOR_DISABLE_counter == 0) - { - + if(MOTOR_DISABLE_counter == 0) + { if (data == LK_CMD_POWER_UP) { // Powerup (beep) //m_beep->set_state(1); //m_beep_counter=600; // BELL = 125 ms @@ -800,7 +799,7 @@ WRITE8_MEMBER(rainbow_state::PORT90_W) m_KBD = data; } - } // prevent beeps during disk load operations + } // prevent beeps during disk load operations } WRITE8_MEMBER(rainbow_state::PORT91_W) @@ -823,20 +822,20 @@ WRITE8_MEMBER(rainbow_state::PORT91_W) // NVRAM offet $A8 : BELL VOLUME (=> ENABLE BELL 0x23) if ( (m_KBD == LK_CMD_BELL) || (m_KBD == LK_CMD_ENB_BELL) ) /* BOTH sound or enable bell have a parameter */ - { /* max volume is 0, lowest is 0x7 */ -// printf("\n%02x BELL CMD has bell volume = %02x\n", m_KBD, 8 - (data & 7)); + { /* max volume is 0, lowest is 0x7 */ +// printf("\n%02x BELL CMD has bell volume = %02x\n", m_KBD, 8 - (data & 7)); m_KBD = 0; // reset previous command. } // NVRAM offet $A9 = KEYCLICK VOLUME (=> ENABLE CLK 0x1b) // NVRAM offset $8C = KEYCLICK ENABLE / DISABLE (0/1) - if ( ( m_KBD == LK_CMD_ENB_KEYCLK ) || ( m_KBD == LK_CMD_SOUND_CLK ) ) /* BOTH keyclick cmds have a parameter */ - { // max volume is 0, lowest is 0x7 - 87 (BELL VOL:1) and 80 (BELL VOL:8) -// printf("\n%02x CLICK CMD - keyclick volume = %02x\n", m_KBD, 8 - (data & 7)); + if ( ( m_KBD == LK_CMD_ENB_KEYCLK ) || ( m_KBD == LK_CMD_SOUND_CLK ) ) /* BOTH keyclick cmds have a parameter */ + { // max volume is 0, lowest is 0x7 - 87 (BELL VOL:1) and 80 (BELL VOL:8) +// printf("\n%02x CLICK CMD - keyclick volume = %02x\n", m_KBD, 8 - (data & 7)); m_KBD = 0; // reset previous command. } -if (m_KBD > 0) +if (m_KBD > 0) printf("UNHANDLED PARAM FOR MODE: %02x / KBD PARAM %02x to AH (91) \n", m_KBD, data); } @@ -846,7 +845,7 @@ READ8_MEMBER(rainbow_state::i8088_latch_r) // printf("Read %02x from 8088 mailbox\n", m_8088_mailbox); m_i8088->set_input_line(INPUT_LINE_INT0, CLEAR_LINE); - INT88 = false; // BISLANG: INTZ80 = false; // + INT88 = false; // BISLANG: INTZ80 = false; // return m_8088_mailbox; } @@ -857,7 +856,7 @@ WRITE8_MEMBER(rainbow_state::i8088_latch_w) m_z80->set_input_line_and_vector(0, ASSERT_LINE, 0xf7); m_z80_mailbox = data; - INTZ80 = true; // + INTZ80 = true; // } // Z80 reads port 0x00 @@ -867,7 +866,7 @@ READ8_MEMBER(rainbow_state::z80_latch_r) // printf("Read %02x from Z80 mailbox\n", m_z80_mailbox); m_z80->set_input_line(0, CLEAR_LINE); - INTZ80 = false; // BISLANG: INT88 = false; + INTZ80 = false; // BISLANG: INT88 = false; return m_z80_mailbox; } @@ -879,7 +878,7 @@ WRITE8_MEMBER(rainbow_state::z80_latch_w) m_i8088->set_input_line_and_vector(INPUT_LINE_INT0, ASSERT_LINE, 0x27); m_8088_mailbox = data; - INT88 = true; + INT88 = true; } // WRITE to 0x20 @@ -891,7 +890,7 @@ WRITE8_MEMBER(rainbow_state::z80_diskdiag_read_w) // (Z80) : PORT 21H _READ_ READ8_MEMBER(rainbow_state::z80_generalstat_r) { -/* +/* General / diag.status register Z80 / see page 157 (table 4-18). D7 : STEP L : reflects status of STEP signal _FROM FDC_ @@ -910,20 +909,20 @@ D0 : ZFLIP L: (read from the diagnostic control register of Z80A) NOTES: ALL LOW ACTIVE - EXCEPT TR00 */ // * TRACK 00 * signal for current drive - int tk00 = ( floppy_tk00_r( m_image[m_unit] ) == CLEAR_LINE ) ? 0x20 : 0x00; + int tk00 = ( floppy_tk00_r( m_image[m_unit] ) == CLEAR_LINE ) ? 0x20 : 0x00; - int fdc_ready = floppy_drive_get_flag_state( m_image[m_unit] , FLOPPY_DRIVE_READY); + int fdc_ready = floppy_drive_get_flag_state( m_image[m_unit] , FLOPPY_DRIVE_READY); int data=( 0x80 | // (STEP L) -// ( (fdc_write_gate) ) | - ( (tk00) ) | -// ( fdc_direction) | - ( (fdc_ready)? 0x00 : 0x08 ) | - ( (INT88) ? 0x00 : 0x04 ) | - ( (INTZ80) ? 0x00 : 0x02 ) | - ( (m_zflip) ? 0x00 : 0x01 ) +// ( (fdc_write_gate) ) | + ( (tk00) ) | +// ( fdc_direction) | + ( (fdc_ready)? 0x00 : 0x08 ) | + ( (INT88) ? 0x00 : 0x04 ) | + ( (INTZ80) ? 0x00 : 0x02 ) | + ( (m_zflip) ? 0x00 : 0x01 ) ); - + return data; } @@ -945,14 +944,14 @@ WRITE8_MEMBER(rainbow_state::z80_diskdiag_write_w) // (Z80) : PORT 40H _READ_ // ********************************************************************** -// POLARITY OF _DRQ_ AND _IRQ_ (depends on controller type!) +// POLARITY OF _DRQ_ AND _IRQ_ (depends on controller type!) // ********************************************************************** READ8_MEMBER(rainbow_state::z80_diskstatus_r) { static int last_track; int track = wd17xx_track_r(m_fdc, space, 0); -if (track != last_track) +if (track != last_track) printf("\n%02d",track); last_track = track; @@ -960,29 +959,29 @@ last_track = track; // AND 00111011 - return what was WRITTEN to D5-D3, D1, D0 previously // (except D7,D6,D2) -int data = m_z80_diskcontrol && 0x3b; +int data = m_z80_diskcontrol && 0x3b; -// D7: DRQ: reflects status of DATA REQUEST signal from FDC. +// D7: DRQ: reflects status of DATA REQUEST signal from FDC. // '1' indicates that FDC has read data OR requires new write data. -data |= wd17xx_drq_r(m_fdc) ? 0x80 : 0x00; +data |= wd17xx_drq_r(m_fdc) ? 0x80 : 0x00; -// D6: IRQ: indicates INTERRUPT REQUEST signal from FDC. Indicates that a -// status bit has changed. Set to 1 at the completion of any +// D6: IRQ: indicates INTERRUPT REQUEST signal from FDC. Indicates that a +// status bit has changed. Set to 1 at the completion of any // command (.. see page 207 or 5-25). -data |= wd17xx_intrq_r(m_fdc) ? 0x40 : 0x00; +data |= wd17xx_intrq_r(m_fdc) ? 0x40 : 0x00; -// D5: SIDE 0H: status of side select signal at J2 + J3 of RX50 controller. -// For 1 sided drives, this bit will always read low (0). +// D5: SIDE 0H: status of side select signal at J2 + J3 of RX50 controller. +// For 1 sided drives, this bit will always read low (0). // D4: MOTOR 1 ON L: 0 = indicates MOTOR 1 ON bit is set in drive control reg. -// D3: MOTOR 0 ON L: 0 = indicates MOTOR 0 ON bit is set in drive " +// D3: MOTOR 0 ON L: 0 = indicates MOTOR 0 ON bit is set in drive " // D2: TG43 L : 0 = INDICATES TRACK > 43 SIGNAL FROM FDC TO DISK DRIVE. -data |= ( track > 43) ? 0x00 : 0x04; +data |= ( track > 43) ? 0x00 : 0x04; // D1: DS1 H: reflect status of bits 0 and 1 form disk.control reg. -// D0: DS0 H: " - return data; +// D0: DS0 H: " + return data; } // (Z80) : PORT 40H * WRITE * @@ -1006,25 +1005,25 @@ WRITE8_MEMBER(rainbow_state::z80_diskcontrol_w) int selected_drive = 255; if (flopimg_get_image( floppy_get_device( machine(), drive ) ) != NULL) - { selected_drive = drive; + { selected_drive = drive; wd17xx_set_drive(m_fdc, selected_drive); } // WD emulation (wd17xx.c) will ignore 'side select' if set to WD1793. // Is it safe to * always assume * single sided 400 K disks? - wd17xx_set_side(m_fdc, (data & 20) ? 1 : 0); + wd17xx_set_side(m_fdc, (data & 20) ? 1 : 0); wd17xx_dden_w(m_fdc, 0); /* SEE 'WRITE_TRACK' : 1 = SD; 0 = DD; enable double density */ - output_set_value("driveled0", (selected_drive == 0) ? 1 : 0 ); - output_set_value("driveled1", (selected_drive == 1) ? 1 : 0 ); + output_set_value("driveled0", (selected_drive == 0) ? 1 : 0 ); + output_set_value("driveled1", (selected_drive == 1) ? 1 : 0 ); - output_set_value("driveled2", (selected_drive == 2) ? 1 : 0 ); - output_set_value("driveled3", (selected_drive == 3) ? 1 : 0 ); + output_set_value("driveled2", (selected_drive == 2) ? 1 : 0 ); + output_set_value("driveled3", (selected_drive == 3) ? 1 : 0 ); - if (selected_drive < 4) - { - m_unit = selected_drive; + if (selected_drive < 4) + { + m_unit = selected_drive; // MOTOR ON flags 1+2 proved to be unreliable in this context. // So this timeout only disables LEDs. @@ -1037,14 +1036,14 @@ WRITE8_MEMBER(rainbow_state::z80_diskcontrol_w) floppy_mon_w(m_image[f_num], (f_num == selected_drive) ? CLEAR_LINE : ASSERT_LINE); // Parameters: DRIVE, STATE, FLAG - floppy_drive_set_ready_state( m_image[f_num], - (f_num == selected_drive) ? 1 : 0, - (f_num == selected_drive) ? force_ready : 0 + floppy_drive_set_ready_state( m_image[f_num], + (f_num == selected_drive) ? 1 : 0, + (f_num == selected_drive) ? force_ready : 0 ); - } + } } - m_z80_diskcontrol = data; + m_z80_diskcontrol = data; } READ8_MEMBER( rainbow_state::read_video_ram_r ) @@ -1068,8 +1067,8 @@ READ8_MEMBER( rainbow_state::diagnostic_r ) return ( (m_diagnostic & (0xf1)) | ( m_inp1->read() | m_inp2->read() | - m_inp3->read() - ) + m_inp3->read() + ) ); } @@ -1078,14 +1077,14 @@ WRITE8_MEMBER( rainbow_state::diagnostic_w ) // printf("%02x to diag port (PC=%x)\n", data, space.device().safe_pc()); m_SCREEN_BLANK = (data & 2) ? false : true; - // SAVE / PROGRAM NVM: transfer data from volatile memory to NVM - if ( !(data & 0x40) && (m_diagnostic & 0x40) ) - memcpy( m_p_nvram, m_p_vol_ram, 256); + // SAVE / PROGRAM NVM: transfer data from volatile memory to NVM + if ( !(data & 0x40) && (m_diagnostic & 0x40) ) + memcpy( m_p_nvram, m_p_vol_ram, 256); - // READ / RECALL NVM: transfer data from NVM to volatile memory - if ( (data & 0x80) && !(m_diagnostic & 0x80) ) + // READ / RECALL NVM: transfer data from NVM to volatile memory + if ( (data & 0x80) && !(m_diagnostic & 0x80) ) memcpy( m_p_vol_ram, m_p_nvram, 256); - + if (!(data & 1)) { m_z80->set_input_line(INPUT_LINE_HALT, ASSERT_LINE); @@ -1100,16 +1099,16 @@ WRITE8_MEMBER( rainbow_state::diagnostic_w ) m_z80->reset(); } - /* Page 197 or 5-13 of formatter description: - ZRESET L : this low input from the 8088 diagnostic write register - resets the formatter controller, loads 03H into the command register, - and resets the not ready (status bit 7). + /* Page 197 or 5-13 of formatter description: + ZRESET L : this low input from the 8088 diagnostic write register + resets the formatter controller, loads 03H into the command register, + and resets the not ready (status bit 7). - When ZRESET goes high (1), a restore command is executed regardless - of the state of the ready signal from the diskette drive and - 01H is loaded into the sector register. + When ZRESET goes high (1), a restore command is executed regardless + of the state of the ready signal from the diskette drive and + 01H is loaded into the sector register. */ - + // reset device when going from high to low, // restore command when going from low to high : wd17xx_mr_w(m_fdc, (data & 1) ? 1 : 0); @@ -1156,7 +1155,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(rainbow_state::keyboard_tick) m_kbd8251->transmit_clock(); m_kbd8251->receive_clock(); - if (MOTOR_DISABLE_counter) + if (MOTOR_DISABLE_counter) MOTOR_DISABLE_counter--; if (MOTOR_DISABLE_counter == 1) @@ -1167,13 +1166,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(rainbow_state::keyboard_tick) output_set_value("driveled3", 0); // DRIVE 3 (D) } - if ( m_crtc->MHFU(1) ) // MHFU ENABLED ? - { -/* int data = m_crtc->MHFU(-1); // increment MHFU, return new value + if ( m_crtc->MHFU(1) ) // MHFU ENABLED ? + { +/* int data = m_crtc->MHFU(-1); // increment MHFU, return new value // if (data > 480) ... - // m_crtc->MHFU(-100); - // machine().schedule_hard_reset(); // not exactly a proper watchdog reset -*/ + // m_crtc->MHFU(-100); + // machine().schedule_hard_reset(); // not exactly a proper watchdog reset +*/ } if (m_beep_counter > 1) @@ -1274,7 +1273,7 @@ static MACHINE_CONFIG_START( rainbow, rainbow_state ) MCFG_SOUND_ROUTE(ALL_OUTPUTS,"mono",0.50) MCFG_FD1793_ADD("wd1793", rainbow_wd17xx_interface ) - MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(floppy_intf) + MCFG_LEGACY_FLOPPY_4_DRIVES_ADD(floppy_intf) MCFG_SOFTWARE_LIST_ADD("flop_list","rainbow") MCFG_I8251_ADD("kbdser", i8251_intf) @@ -1286,7 +1285,7 @@ MACHINE_CONFIG_END -// ROM definition for 100-B +// ROM definition for 100-B ROM_START( rainbow ) ROM_REGION(0x100000,"maincpu", 0) ROM_LOAD( "23-022e5-00.bin", 0xf0000, 0x4000, CRC(9d1332b4) SHA1(736306d2a36bd44f95a39b36ebbab211cc8fea6e)) @@ -1304,8 +1303,8 @@ ROM_END // 'Rainbow 190 B' (announced March 1985) is identical hardware with alternate ROM v5.05 // According to an article in Wall Street Journal, it came with a 10 MB HD and 640 K RAM. -// We have no version history. The BOOT 2.4 README reveals 'recent ROM changes for MASS 11' -// in January 1985. These were not contained in the older version 04.03.11 (for PC-100-A) +// We have no version history. The BOOT 2.4 README reveals 'recent ROM changes for MASS 11' +// in January 1985. These were not contained in the older version 04.03.11 (for PC-100-A) // and also not present in version 05.03 (from PC-100B / PC100B+). // A first glance: @@ -1316,7 +1315,7 @@ ROM_START( rainb190 ) ROM_REGION(0x100000,"maincpu", 0) ROM_LOAD( "dec190rom0.bin", 0xf0000, 0x4000, CRC(FAC191D2) ) ROM_RELOAD(0xf4000,0x4000) - ROM_LOAD( "dec190rom1.bin", 0xf8000, 0x4000, CRC(5CE59632) ) + ROM_LOAD( "dec190rom1.bin", 0xf8000, 0x4000, CRC(5CE59632) ) ROM_RELOAD(0xfc000,0x4000) ROM_REGION(0x1000, "chargen", 0) @@ -1327,4 +1326,4 @@ ROM_END /* YEAR NAME PARENT COMPAT MACHINE INPUT STATE INIT COMPANY FULLNAME FLAGS */ COMP( 1983, rainbow , 0 , 0, rainbow, rainbow100b_in, driver_device, 0, "Digital Equipment Corporation", "Rainbow 100-B", GAME_NOT_WORKING | GAME_IMPERFECT_COLORS) -COMP( 1985, rainb190, rainbow, 0, rainbow, rainbow100b_in, driver_device, 0, "Digital Equipment Corporation", "Rainbow 190-B", GAME_NOT_WORKING | GAME_IMPERFECT_COLORS) \ No newline at end of file +COMP( 1985, rainb190, rainbow, 0, rainbow, rainbow100b_in, driver_device, 0, "Digital Equipment Corporation", "Rainbow 190-B", GAME_NOT_WORKING | GAME_IMPERFECT_COLORS) diff --git a/src/mess/drivers/sh4robot.c b/src/mess/drivers/sh4robot.c index 813b05f52e..42e4b8e0bf 100644 --- a/src/mess/drivers/sh4robot.c +++ b/src/mess/drivers/sh4robot.c @@ -1,28 +1,28 @@ /*************************************************************************** - + SH4 Robot - http://perso.telecom-paristech.fr/~polti/robot/ - + http://perso.telecom-paristech.fr/~polti/robot/ + 27/11/2013 Skeleton driver. - - 0x0000 0000 - 0x7FFF FFFF : P0 area, cachable - 0x8000 0000 - 0x9FFF FFFF : P1 area, cachable - 0xA000 0000 - 0xBFFF FFFF : P2 area, non-cachable - 0xC000 0000 - 0xDFFF FFFF : P3 area, cachable - 0xE000 0000 - 0xFFFF FFFF : P4 area, non-cachable - - 0x0000 0000 - 0x03FF FFFF : Area 0 (boot, ROM) - 0x0400 0000 - 0x07FF FFFF : Area 1 (FPGA) - 0x0800 0000 - 0x08FF FFFF : Area 2 (SDRAM 1, 16M) - 0x0C00 0000 - 0x0CFF FFFF : Area 3 (SDRAM 2, 16M) - 0x1000 0000 - 0x13FF FFFF : Area 4 (FPGA) - 0x1400 0000 - 0x17FF FFFF : Area 5 (FPGA) - 0x1800 0000 - 0x1BFF FFFF : Area 6 (FPGA) - 0x1C00 0000 - 0x1FFF FFFF : Area 7 (reserved) - + 0x0000 0000 - 0x7FFF FFFF : P0 area, cachable + 0x8000 0000 - 0x9FFF FFFF : P1 area, cachable + 0xA000 0000 - 0xBFFF FFFF : P2 area, non-cachable + 0xC000 0000 - 0xDFFF FFFF : P3 area, cachable + 0xE000 0000 - 0xFFFF FFFF : P4 area, non-cachable + + + 0x0000 0000 - 0x03FF FFFF : Area 0 (boot, ROM) + 0x0400 0000 - 0x07FF FFFF : Area 1 (FPGA) + 0x0800 0000 - 0x08FF FFFF : Area 2 (SDRAM 1, 16M) + 0x0C00 0000 - 0x0CFF FFFF : Area 3 (SDRAM 2, 16M) + 0x1000 0000 - 0x13FF FFFF : Area 4 (FPGA) + 0x1400 0000 - 0x17FF FFFF : Area 5 (FPGA) + 0x1800 0000 - 0x1BFF FFFF : Area 6 (FPGA) + 0x1C00 0000 - 0x1FFF FFFF : Area 7 (reserved) + ****************************************************************************/ #include "emu.h" @@ -57,22 +57,22 @@ INPUT_PORTS_END static const struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, 200000000 }; static MACHINE_CONFIG_START( sh4robot, sh4robot_state ) - /* basic machine hardware */ - MCFG_CPU_ADD("maincpu", SH4LE, 200000000) // SH7750 + /* basic machine hardware */ + MCFG_CPU_ADD("maincpu", SH4LE, 200000000) // SH7750 MCFG_CPU_CONFIG(sh4cpu_config) - MCFG_CPU_PROGRAM_MAP(sh4robot_mem) + MCFG_CPU_PROGRAM_MAP(sh4robot_mem) MCFG_CPU_IO_MAP(sh4robot_io) - + MACHINE_CONFIG_END /* ROM definition */ ROM_START( sh4robot ) - ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASEFF ) - ROM_LOAD( "bootloader.bin", 0x0000, 0x0882, CRC(d2ea0b7d) SHA1(7dd566c5e325d1ce1156a0bcbd7e10d011e9d35f)) - + ROM_REGION( 0x1000, "maincpu", ROMREGION_ERASEFF ) + ROM_LOAD( "bootloader.bin", 0x0000, 0x0882, CRC(d2ea0b7d) SHA1(7dd566c5e325d1ce1156a0bcbd7e10d011e9d35f)) + // FLASH TC58128AFT // flash blocks 1 till 199 (1*32*512 till 199*32*512) - //ROM_LOAD( "vmlinux-nand_img_with_oob-2.6.10-v1.0", 0x0000, 0x149be0, CRC(eec69ef5) SHA1(524e26d2c2c28061911f4726646b18596d134736)) + //ROM_LOAD( "vmlinux-nand_img_with_oob-2.6.10-v1.0", 0x0000, 0x149be0, CRC(eec69ef5) SHA1(524e26d2c2c28061911f4726646b18596d134736)) // Root FS at flash blocks from 201 till end (201*32*512) //ROM_LOAD( "shix-linux-v1.0.yaffs", 0x0000, 0x7e9e40, CRC(7a7fdb04) SHA1(0b761e2d179335398399cb046de4e591157cb72f)) ROM_END @@ -80,4 +80,4 @@ ROM_END /* Driver */ /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME FLAGS */ -COMP( ????, sh4robot, 0, 0, sh4robot, sh4robot, driver_device, 0, "", "Robot", GAME_NOT_WORKING | GAME_NO_SOUND) \ No newline at end of file +COMP( ????, sh4robot, 0, 0, sh4robot, sh4robot, driver_device, 0, "", "Robot", GAME_NOT_WORKING | GAME_NO_SOUND) diff --git a/src/mess/drivers/tiki100.c b/src/mess/drivers/tiki100.c index b1eb943f61..7c2285713f 100644 --- a/src/mess/drivers/tiki100.c +++ b/src/mess/drivers/tiki100.c @@ -14,7 +14,7 @@ TODO: - - 3 expansion slots + - 3 expansion slots - palette RAM should be written during HBLANK - DART clocks - winchester hard disk @@ -240,7 +240,7 @@ static ADDRESS_MAP_START( tiki100_io, AS_IO, 8, tiki100_state ) AM_RANGE(0x17, 0x17) AM_DEVREADWRITE(AY8912_TAG, ay8910_device, data_r, data_w) AM_RANGE(0x18, 0x1b) AM_DEVREADWRITE(Z80CTC_TAG, z80ctc_device, read, write) AM_RANGE(0x1c, 0x1c) AM_MIRROR(0x03) AM_WRITE(system_w) -// AM_RANGE(0x20, 0x27) AM_NOP // winchester controller +// AM_RANGE(0x20, 0x27) AM_NOP // winchester controller // AM_RANGE(0x60, 0x6f) analog I/O (SINTEF) // AM_RANGE(0x60, 0x67) digital I/O (RVO) // AM_RANGE(0x70, 0x77) analog/digital I/O @@ -491,18 +491,18 @@ static Z80DART_INTERFACE( dart_intf ) READ8_MEMBER( tiki100_state::pio_pb_r ) { /* - + bit description - - 0 - 1 - 2 - 3 + + 0 + 1 + 2 + 3 4 ACK 5 BUSY 6 NO PAPER 7 UNIT SELECT, tape in - + */ UINT8 data = 0; @@ -521,18 +521,18 @@ READ8_MEMBER( tiki100_state::pio_pb_r ) WRITE8_MEMBER( tiki100_state::pio_pb_w ) { /* - + bit description - + 0 STRB - 1 - 2 - 3 - 4 - 5 + 1 + 2 + 3 + 4 + 5 6 tape out - 7 - + 7 + */ // centronics diff --git a/src/mess/drivers/v1050.c b/src/mess/drivers/v1050.c index cdf75777ba..6f90dc2de0 100644 --- a/src/mess/drivers/v1050.c +++ b/src/mess/drivers/v1050.c @@ -142,7 +142,7 @@ Notes: TODO: - - floppy 1 is broken + - floppy 1 is broken - write to banked RAM at 0x0000-0x1fff when ROM is active - real keyboard w/i8049 - keyboard beeper (NE555 wired in strange mix of astable/monostable modes) diff --git a/src/mess/drivers/v6809.c b/src/mess/drivers/v6809.c index 4417e1bd9a..81ad03deaa 100644 --- a/src/mess/drivers/v6809.c +++ b/src/mess/drivers/v6809.c @@ -317,8 +317,8 @@ WRITE_LINE_MEMBER( v6809_state::speaker_en_w ) WRITE_LINE_MEMBER( v6809_state::speaker_w ) { -// if (m_speaker_en) -// m_speaker->level_w(state); +// if (m_speaker_en) +// m_speaker->level_w(state); } static const ptm6840_interface mc6840_intf = diff --git a/src/mess/drivers/wicat.c b/src/mess/drivers/wicat.c index c20b474cd9..58ef81c4fa 100644 --- a/src/mess/drivers/wicat.c +++ b/src/mess/drivers/wicat.c @@ -690,7 +690,7 @@ static MACHINE_CONFIG_START( wicat, wicat_state ) MCFG_CPU_ADD("floppycpu",N8X300,XTAL_8MHz) MCFG_CPU_PROGRAM_MAP(wicat_flop_mem) MCFG_CPU_IO_MAP(wicat_flop_io) -// MCFG_FD1795_ADD("fdc") +// MCFG_FD1795_ADD("fdc") MACHINE_CONFIG_END diff --git a/src/mess/drivers/xavix.c b/src/mess/drivers/xavix.c index d1c6fca175..a407de28bb 100644 --- a/src/mess/drivers/xavix.c +++ b/src/mess/drivers/xavix.c @@ -2,13 +2,13 @@ // copyright-holders: ? /*************************************************************************** - Skeleton driver for XaviX TV PNP console and childs (Let's! Play TV Classic) + Skeleton driver for XaviX TV PNP console and childs (Let's! Play TV Classic) - CPU is M6502 derivative, almost likely to be a G65816 + CPU is M6502 derivative, almost likely to be a G65816 - TODO: - - understand how to map ROM at 0x800000-0x9fffff / 0xc00000 / 0xdfffff - banks (granted that we have the ROM for that, of course) + TODO: + - understand how to map ROM at 0x800000-0x9fffff / 0xc00000 / 0xdfffff + banks (granted that we have the ROM for that, of course) ***************************************************************************/ diff --git a/src/mess/drivers/xerox820.c b/src/mess/drivers/xerox820.c index 554191d4ea..049a38a405 100644 --- a/src/mess/drivers/xerox820.c +++ b/src/mess/drivers/xerox820.c @@ -14,8 +14,8 @@ - Xerox 820 - floppy format has 3xcd at the end of track data - :u109: write track 0 - :u109: track description 16xff ... 109xff 3xcd + :u109: write track 0 + :u109: track description 16xff ... 109xff 3xcd - Xerox 820-II - floppy (read/write to FDC triggers Z80 WAIT) - Winchester diff --git a/src/mess/includes/mc1502.h b/src/mess/includes/mc1502.h index 7348f0071d..a5c973bf0f 100644 --- a/src/mess/includes/mc1502.h +++ b/src/mess/includes/mc1502.h @@ -77,11 +77,11 @@ public: DECLARE_WRITE8_MEMBER(mc1502_kppi_portb_w); DECLARE_WRITE8_MEMBER(mc1502_kppi_portc_w); /* - TIMER_CALLBACK_MEMBER(fdc_motor_callback); - static struct { - int fdc_motor_on; - emu_timer *fdc_motor_timer; - } m_motor; + TIMER_CALLBACK_MEMBER(fdc_motor_callback); + static struct { + int fdc_motor_on; + emu_timer *fdc_motor_timer; + } m_motor; */ const char *m_cputag; }; diff --git a/src/mess/includes/poisk1.h b/src/mess/includes/poisk1.h index 87f97c8ab4..8497c543d4 100644 --- a/src/mess/includes/poisk1.h +++ b/src/mess/includes/poisk1.h @@ -16,7 +16,7 @@ #include "machine/xsu_cards.h" #include "sound/speaker.h" -#define POISK1_UPDATE_ROW(name) \ +#define POISK1_UPDATE_ROW(name) \ void name(bitmap_rgb32 &bitmap, const rectangle &cliprect, UINT8 *videoram, UINT16 ma, UINT8 ra, UINT8 stride) class p1_state : public driver_device @@ -49,7 +49,7 @@ public: DECLARE_MACHINE_RESET(poisk1); IRQ_CALLBACK_MEMBER(p1_irq_callback); - + virtual void palette_init(); virtual void video_start(); UINT32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/mess/includes/prof80.h b/src/mess/includes/prof80.h index da3efc8c0c..b43fccc322 100644 --- a/src/mess/includes/prof80.h +++ b/src/mess/includes/prof80.h @@ -17,7 +17,7 @@ #include "machine/upd765.h" #define Z80_TAG "z1" -#define MMU_TAG "mmu" +#define MMU_TAG "mmu" #define UPD765_TAG "z38" #define UPD1990A_TAG "z43" #define RS232_A_TAG "rs232a" diff --git a/src/mess/layout/rainbow.lay b/src/mess/layout/rainbow.lay index d62437b877..c41c81d3c9 100644 --- a/src/mess/layout/rainbow.lay +++ b/src/mess/layout/rainbow.lay @@ -84,7 +84,7 @@ - + diff --git a/src/mess/machine/dec_lk201.c b/src/mess/machine/dec_lk201.c index 4383821fec..1aa7749cd0 100644 --- a/src/mess/machine/dec_lk201.c +++ b/src/mess/machine/dec_lk201.c @@ -6,14 +6,14 @@ */ /* LK201-AA keyboard matrix (8048 version with updates) - Source: VCB02 Technical Reference. + Source: VCB02 Technical Reference. - KBD controller scan matrix (PORT 1): 8 x BCD IN => 18 DECIMAL OUT + KBD controller scan matrix (PORT 1): 8 x BCD IN => 18 DECIMAL OUT Keyboard itself: - 18 x IN (KEYBOARD DRIVE) KBD 17... KBD 0 => - 8 OUT (keyboard data @ D7..D0) - + 18 x IN (KEYBOARD DRIVE) KBD 17... KBD 0 => + 8 OUT (keyboard data @ D7..D0) + to => PORT 0 @ KBD controller. ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 @@ -34,7 +34,7 @@ ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 --------|----|----|----|---|---|---|---|--- ..KBD13:|Ins.|--- |'Do'|Prev { |" |[R]|[R] ........|Here|- | Scrn| [ |' | | -........|E17 |E11 |G16 |D17|D11|C11| | +........|E17 |E11 |G16 |D17|D11|C11| | --------|----|----|----|---|---|---|---|--- ..KBD12:|Find|+ |Help|Se-| } |Re-|C:L| | ........| |= | |lect ] |turn...| \ @@ -45,14 +45,14 @@ ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 ........|G14 | E13|....|E10|D10|...|C10|B10 --------|----|----|----|---|---|---|---|--- ..KBD10:|[R] |F12 |[R] |F13| ( |O |L | . -........|....|(BS)| |(LF) 9 | | | . +........|....|(BS)| |(LF) 9 | | | . ........|....|G12 |....|G13|E09|D09|C09|B09 --------|----|----|----|---|---|---|---|--- ..KBD_9:|[R] |F11 |[R] |[R]|* |I |K | , ........|....|ESC | | |8 | | | , ........|....|G11 |....|...|E08|D08|C08|B08 --------|----|----|----|---|---|---|---|--- -..KBD_8:|[R] |Main|[R] Exit|& |U |J |M +..KBD_8:|[R] |Main|[R] Exit|& |U |J |M ........| |Scrn| | |7 | | | ........| |G08 | |G09|E07|D07|C07|B07 --------|----|----|----|---|---|---|---|--- @@ -65,7 +65,7 @@ ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 ........|....|....|....|G05|E05|D05|C05|B05 --------|----|----|----|---|---|---|---|--- ..KBD_5: F4 |Break [R]|$ |R |F |V |Space -........|....|....|....|4 | | | | +........|....|....|....|4 | | | | ........ G02 |G03 |....|E04 D04 C04 B04 A01-A09 --------|----|----|----|---|---|---|---|--- ..KBD_4: [R] |Prt.|[R] |Set|# |E |D |C @@ -77,7 +77,7 @@ ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 ........|G99 |E02 |....|D00|D02|C02|B02|B00 --------|----|----|----|---|---|---|---|--- ..KBD_2: [R] |[R] |[R] |~ |! |Q |A |Z -........|..............|...|1 +........|..............|...|1 ........|..............|E00 E01 D01 C01 B01 --------|----|----|----|---|---|---|---|--- ..KBD_1: Ctrl|Lock|Comp|[R] @@ -93,13 +93,13 @@ ________|D7 |D6 |D5 |D4 |D3 |D2 |D1 |D0 Normally only the N0 keyswitch is implemented as a double-sized key. NOTE 3) Return key occupies 2 positions that are decoded as the Return (C13) key. - + C:D - Cursor down (B17) C:U - Cursor up (C17) C:R - Cursor right (B18) C:L - Cursor left (B16) */ - + #include "emu.h" #include "dec_lk201.h" #include "cpu/m6805/m6805.h" diff --git a/src/mess/machine/kb_poisk1.h b/src/mess/machine/kb_poisk1.h index babf487b35..7449452ad3 100644 --- a/src/mess/machine/kb_poisk1.h +++ b/src/mess/machine/kb_poisk1.h @@ -18,22 +18,22 @@ INPUT_PORTS_START( poisk1_keyboard_v89 ) PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Enter") PORT_CODE(KEYCODE_ENTER) PORT_CHAR('\r') PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 8") PORT_CODE(KEYCODE_8_PAD) PORT_CODE(KEYCODE_UP) PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 2") PORT_CODE(KEYCODE_2_PAD) PORT_CODE(KEYCODE_DOWN) -/*-12*/ PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-12 - ?") /* PORT_CODE(KEYCODE_SLASH) PORT_CHAR('?') PORT_CHAR('/') */ +/*-12*/ PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-12 - ?") /* PORT_CODE(KEYCODE_SLASH) PORT_CHAR('?') PORT_CHAR('/') */ PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_O) PORT_CHAR('o') PORT_CHAR('O') -/*-11*/ PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-11 - %") /* PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') */ +/*-11*/ PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-11 - %") /* PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') */ PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F11") PORT_CODE(KEYCODE_F11) PORT_CHAR(UCHAR_MAMEKEY(F11)) PORT_START("Y2") -/*-15*/ PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-15 - !") /* PORT_CODE(KEYCODE_1) PORT_CHAR('!') PORT_CHAR('1') */ +/*-15*/ PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-15 - !") /* PORT_CODE(KEYCODE_1) PORT_CHAR('!') PORT_CHAR('1') */ PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 4") PORT_CODE(KEYCODE_4_PAD) PORT_CODE(KEYCODE_LEFT) PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 0") PORT_CODE(KEYCODE_0_PAD) PORT_CODE(KEYCODE_INSERT) /* ??? */ PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) -/*-13*/ PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-13 - ;") /* PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') */ +/*-13*/ PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-13 - ;") /* PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') */ PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME(UTF8_LEFT) PORT_CODE(KEYCODE_BACKSPACE) PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 7") PORT_CODE(KEYCODE_7_PAD) PORT_CODE(KEYCODE_HOME) PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 1") PORT_CODE(KEYCODE_1_PAD) PORT_CODE(KEYCODE_END) -/*-2*/ PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-2 - .") /* PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') */ -/*-3*/ PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-3 - _") /* PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') */ +/*-2*/ PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-2 - .") /* PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') */ +/*-3*/ PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-3 - _") /* PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') */ PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('p') PORT_CHAR('P') PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_OPENBRACE) PORT_CHAR('[') PORT_CHAR('{') // 0x54 @@ -58,17 +58,17 @@ INPUT_PORTS_START( poisk1_keyboard_v89 ) PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F6") PORT_CODE(KEYCODE_F6) PORT_CHAR(UCHAR_MAMEKEY(F6)) PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F2") PORT_CODE(KEYCODE_F2) PORT_CHAR(UCHAR_MAMEKEY(F2)) PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F1") PORT_CODE(KEYCODE_F1) PORT_CHAR(UCHAR_MAMEKEY(F1)) -/*-1*/ PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-1 - *") /* PORT_CODE(KEYCODE_8) PORT_CHAR('*') PORT_CHAR('8') */ +/*-1*/ PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-1 - *") /* PORT_CODE(KEYCODE_8) PORT_CHAR('*') PORT_CHAR('8') */ PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Esc") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) /* ??2 */ -/*-9*/ PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-9 - :") /* PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') */ -/*-10*/ PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-10 - ,") /* PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') */ +/*-9*/ PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-9 - :") /* PORT_CODE(KEYCODE_COLON) PORT_CHAR(';') PORT_CHAR(':') */ +/*-10*/ PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-10 - ,") /* PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') */ PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F5") PORT_CODE(KEYCODE_F5) PORT_CHAR(UCHAR_MAMEKEY(F5)) PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F4") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(F4)) PORT_START("Y5") PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_E) PORT_CHAR('e') PORT_CHAR('E') PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_UNUSED ) -/*?*/ PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(RCONTROL)) +/*?*/ PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Ctrl") PORT_CODE(KEYCODE_RCONTROL) PORT_CHAR(UCHAR_MAMEKEY(RCONTROL)) PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_H) PORT_CHAR('h') PORT_CHAR('H') PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_W) PORT_CHAR('w') PORT_CHAR('W') PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') @@ -82,7 +82,7 @@ INPUT_PORTS_START( poisk1_keyboard_v89 ) PORT_START("Y6") PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Left Shift") PORT_CODE(KEYCODE_LSHIFT) PORT_CHAR(UCHAR_SHIFT_1) PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad *") PORT_CODE(KEYCODE_ASTERISK) PORT_CHAR(UCHAR_MAMEKEY(ASTERISK)) -/*?*/ PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Alt") PORT_CODE(KEYCODE_RALT) +/*?*/ PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Alt") PORT_CODE(KEYCODE_RALT) PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('c') PORT_CHAR('C') PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('x') PORT_CHAR('X') PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?dc?") // 0xdc = SHIFT2 @@ -108,18 +108,18 @@ INPUT_PORTS_START( poisk1_keyboard_v89 ) PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) PORT_START("Y8") -/*-6*/ PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-6 - -") /* PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') */ +/*-6*/ PORT_BIT( 0x001, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-6 - -") /* PORT_CODE(KEYCODE_MINUS) PORT_CHAR('-') PORT_CHAR('_') */ PORT_BIT( 0x002, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad -") PORT_CODE(KEYCODE_MINUS_PAD) PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Tab") PORT_CODE(KEYCODE_TAB) PORT_CHAR('\t') /* ??? */ PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Y) PORT_CHAR('y') PORT_CHAR('Y') -/*-7*/ PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-7 - )") /* PORT_CODE(KEYCODE_0) PORT_CHAR(')') PORT_CHAR('0') */ +/*-7*/ PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-7 - )") /* PORT_CODE(KEYCODE_0) PORT_CHAR(')') PORT_CHAR('0') */ PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Scroll Lock") -/*-4*/ PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-4 - (") /* PORT_CODE(KEYCODE_9) PORT_CHAR('(') PORT_CHAR('9') */ +/*-4*/ PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-4 - (") /* PORT_CODE(KEYCODE_9) PORT_CHAR('(') PORT_CHAR('9') */ PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR('\\') PORT_CHAR('|') PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_U) PORT_CHAR('u') PORT_CHAR('U') -/*-5*/ PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-5 - \"") /* PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('"') PORT_CHAR('\'') */ -/*-8*/ PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-8 - /") /* PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') */ +/*-5*/ PORT_BIT( 0x400, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-5 - \"") /* PORT_CODE(KEYCODE_QUOTE) PORT_CHAR('"') PORT_CHAR('\'') */ +/*-8*/ PORT_BIT( 0x800, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("?-8 - /") /* PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') */ #if 0 PORT_BIT( 0x004, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Delete") PORT_CODE(KEYCODE_DEL_PAD) @@ -130,7 +130,7 @@ INPUT_PORTS_START( poisk1_keyboard_v89 ) PORT_BIT( 0x000, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('^') PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_7) PORT_CHAR('7') PORT_CHAR('&') PORT_BIT( 0x000, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_TILDE) PORT_CHAR('`') PORT_CHAR('~') - PORT_BIT( 0x000, IP_ACTIVE_LOW, IPT_KEYBOARD ) + PORT_BIT( 0x000, IP_ACTIVE_LOW, IPT_KEYBOARD ) #endif INPUT_PORTS_END @@ -227,7 +227,7 @@ INPUT_PORTS_START( poisk1_keyboard_v91 ) PORT_BIT( 0x008, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_BIT( 0x010, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("- / UKRAINIAN XXX") PORT_CODE(KEYCODE_MINUS_PAD) PORT_BIT( 0x020, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F9") PORT_CODE(KEYCODE_F9) PORT_CHAR(UCHAR_MAMEKEY(F9)) - PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Scroll Lock") + PORT_BIT( 0x040, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Scroll Lock") PORT_BIT( 0x080, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Keypad 6") PORT_CODE(KEYCODE_6_PAD) PORT_CODE(KEYCODE_RIGHT) PORT_BIT( 0x100, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('l') PORT_CHAR('L') PORT_BIT( 0x200, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("F7") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) diff --git a/src/mess/machine/mb8795.c b/src/mess/machine/mb8795.c index 65887e9c95..e56a2b97d5 100644 --- a/src/mess/machine/mb8795.c +++ b/src/mess/machine/mb8795.c @@ -18,7 +18,7 @@ ADDRESS_MAP_END mb8795_device::mb8795_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, MB8795, "Fujitsu MB8795", tag, owner, clock, "mb8795", __FILE__), - device_network_interface(mconfig, *this, 10) + device_network_interface(mconfig, *this, 10) { } @@ -205,9 +205,9 @@ void mb8795_device::tx_dma_w(UINT8 data, bool eof) if(eof) { logerror("%s: send packet, dest=%02x.%02x.%02x.%02x.%02x.%02x len=%04x loopback=%s\n", tag(), - txbuf[0], txbuf[1], txbuf[2], txbuf[3], txbuf[4], txbuf[5], - txlen, - txmode & EN_TMD_LB_DISABLE ? "off" : "on"); + txbuf[0], txbuf[1], txbuf[2], txbuf[3], txbuf[4], txbuf[5], + txlen, + txmode & EN_TMD_LB_DISABLE ? "off" : "on"); if(txlen > 1500) txlen = 1500; // Weird packet send on loopback test in the next diff --git a/src/mess/machine/mc1502_fdc.c b/src/mess/machine/mc1502_fdc.c index a8d9523386..6fbf87681f 100644 --- a/src/mess/machine/mc1502_fdc.c +++ b/src/mess/machine/mc1502_fdc.c @@ -212,16 +212,16 @@ void mc1502_fdc_device::device_start() set_isa_device(); // BIOS 5.0, 5.2 - m_isa->install_device(0x010c, 0x010f, 0, 0, + m_isa->install_device(0x010c, 0x010f, 0, 0, READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read), WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) ); m_isa->install_device(this, 0x0100, 0x010b, 0, 0, FUNC(mc1502_FDC_r), FUNC(mc1502_FDC_w) ); // BIOS 5.31, 5.33 /* - m_isa->install_device(0x010c, 0x010f, 0, 0, - READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read), - WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) ); - m_isa->install_device(this, 0x0100, 0x010b, 0, 0, FUNC(mc1502_FDC_r), FUNC(mc1502_FDC_w) ); + m_isa->install_device(0x010c, 0x010f, 0, 0, + READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read), + WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) ); + m_isa->install_device(this, 0x0100, 0x010b, 0, 0, FUNC(mc1502_FDC_r), FUNC(mc1502_FDC_w) ); */ m_fdc->setup_drq_cb(fd1793_t::line_cb(FUNC(mc1502_fdc_device::mc1502_fdc_irq_drq), this)); m_fdc->setup_intrq_cb(fd1793_t::line_cb(FUNC(mc1502_fdc_device::mc1502_fdc_irq_drq), this)); diff --git a/src/mess/machine/nes_mmc5.c b/src/mess/machine/nes_mmc5.c index 0a1bbdced2..54c84deb93 100644 --- a/src/mess/machine/nes_mmc5.c +++ b/src/mess/machine/nes_mmc5.c @@ -41,7 +41,7 @@ const device_type NES_EXROM = &device_creator; nes_exrom_device::nes_exrom_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : nes_nrom_device(mconfig, NES_EXROM, "NES Cart ExROM (MMC-5) PCB", tag, owner, clock, "nes_exrom", __FILE__) + : nes_nrom_device(mconfig, NES_EXROM, "NES Cart ExROM (MMC-5) PCB", tag, owner, clock, "nes_exrom", __FILE__) { } diff --git a/src/mess/machine/p1_fdc.c b/src/mess/machine/p1_fdc.c index ef24a4de48..6035b67746 100644 --- a/src/mess/machine/p1_fdc.c +++ b/src/mess/machine/p1_fdc.c @@ -134,7 +134,7 @@ void p1_fdc_device::p1_wd17xx_aux_w(int data) if(!BIT(data, 6)) m_fdc->reset(); - + m_fdc->set_floppy(floppy); floppy->ss_w(BIT(data, 4)); @@ -196,7 +196,7 @@ void p1_fdc_device::device_start() { set_isa_device(); m_isa->install_rom(this, 0xe0000, 0xe07ff, 0, 0, "XXX", "p1_fdc"); - m_isa->install_device(0x00c0, 0x00c3, 0, 0, + m_isa->install_device(0x00c0, 0x00c3, 0, 0, READ8_DEVICE_DELEGATE(m_fdc, fd1793_t, read), WRITE8_DEVICE_DELEGATE(m_fdc, fd1793_t, write) ); m_isa->install_device(this, 0x00c4, 0x00c7, 0, 0, FUNC(p1_FDC_r), FUNC(p1_FDC_w) ); diff --git a/src/mess/machine/p1_hdc.c b/src/mess/machine/p1_hdc.c index 3ea7f972a7..5a52d9df53 100644 --- a/src/mess/machine/p1_hdc.c +++ b/src/mess/machine/p1_hdc.c @@ -28,7 +28,7 @@ } \ } while (0) -#define KM1809VG7_TAG "d17" +#define KM1809VG7_TAG "d17" //************************************************************************** @@ -109,7 +109,7 @@ READ8_MEMBER(p1_hdc_device::p1_HDC_r) UINT8 data = 0x00; switch (offset >> 8) { - case 8: data = m_hdc->read(space, offset & 255); + case 8: data = m_hdc->read(space, offset & 255); } DBG_LOG(1,"hdc",("R $%04x == $%02x\n", offset, data)); @@ -120,7 +120,7 @@ WRITE8_MEMBER(p1_hdc_device::p1_HDC_w) { DBG_LOG(1,"hdc",("W $%04x <- $%02x\n", offset, data)); switch (offset >> 8) { - case 8: m_hdc->write(space, offset & 255, data, 0); + case 8: m_hdc->write(space, offset & 255, data, 0); } } @@ -144,7 +144,7 @@ void p1_hdc_device::device_start() { set_isa_device(); m_isa->install_rom(this, 0xe2000, 0xe27ff, 0, 0, "XXX", "p1_hdc"); - m_isa->install_memory(0xd0000, 0xd0fff, 0, 0, + m_isa->install_memory(0xd0000, 0xd0fff, 0, 0, READ8_DELEGATE(p1_hdc_device, p1_HDC_r), WRITE8_DELEGATE(p1_hdc_device, p1_HDC_w) ); } diff --git a/src/mess/machine/prof80mmu.c b/src/mess/machine/prof80mmu.c index 1acad1a90b..720fef9abd 100644 --- a/src/mess/machine/prof80mmu.c +++ b/src/mess/machine/prof80mmu.c @@ -103,7 +103,7 @@ READ8_MEMBER( prof80_mmu_device::program_r ) { offset |= 0xf0000; } - + return this->space(AS_PROGRAM).read_byte(offset); } @@ -123,6 +123,6 @@ WRITE8_MEMBER( prof80_mmu_device::program_w ) { offset |= 0xf0000; } - + this->space(AS_PROGRAM).write_byte(offset, data); } diff --git a/src/mess/machine/prof80mmu.h b/src/mess/machine/prof80mmu.h index d5de2f5265..f7407ddb20 100644 --- a/src/mess/machine/prof80mmu.h +++ b/src/mess/machine/prof80mmu.h @@ -33,7 +33,7 @@ // ======================> prof80_mmu_device class prof80_mmu_device : public device_t, - public device_memory_interface + public device_memory_interface { public: prof80_mmu_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); diff --git a/src/mess/machine/xsu_cards.c b/src/mess/machine/xsu_cards.c index 2559845431..b93ccc9a40 100644 --- a/src/mess/machine/xsu_cards.c +++ b/src/mess/machine/xsu_cards.c @@ -11,13 +11,13 @@ SLOT_INTERFACE_START( p1_isa8_cards ) SLOT_INTERFACE("rom", P1_ROM) - SLOT_INTERFACE("fdc", P1_FDC) // B504 - SLOT_INTERFACE("hdc", P1_HDC) // B942 + SLOT_INTERFACE("fdc", P1_FDC) // B504 + SLOT_INTERFACE("hdc", P1_HDC) // B942 /* - SLOT_INTERFACE("comlpt", P1_COMLPT) // B620 - SLOT_INTERFACE("joy", P1_JOY) // B621 - SLOT_INTERFACE("mouse", P1_MOUSE) // B943 - SLOT_INTERFACE("lan", P1_LAN) // B944 + SLOT_INTERFACE("comlpt", P1_COMLPT) // B620 + SLOT_INTERFACE("joy", P1_JOY) // B621 + SLOT_INTERFACE("mouse", P1_MOUSE) // B943 + SLOT_INTERFACE("lan", P1_LAN) // B944 */ SLOT_INTERFACE("pccom", ISA8_COM) SLOT_INTERFACE("pclpt", ISA8_LPT) @@ -28,7 +28,7 @@ SLOT_INTERFACE_START( mc1502_isa8_cards ) SLOT_INTERFACE("rom", MC1502_ROM) SLOT_INTERFACE("fdc", MC1502_FDC) /* - SLOT_INTERFACE("hdc", MC1502_HDC) + SLOT_INTERFACE("hdc", MC1502_HDC) */ SLOT_INTERFACE("pccom", ISA8_COM) SLOT_INTERFACE("pclpt", ISA8_LPT) diff --git a/src/mess/mess.lst b/src/mess/mess.lst index b791e2f847..24a2301dbf 100644 --- a/src/mess/mess.lst +++ b/src/mess/mess.lst @@ -177,11 +177,11 @@ sd1 // 1990 SD-1 sq1 // 1990 SQ-1 sqrack // 1990 SQ-Rack sd132 // 1991 SD-1 32 -asr10 // 1992 ASR-10 +asr10 // 1992 ASR-10 kt76 // 1996 KT-76 mr61 // 1996 MR-61 mrrack // 1996 MR-Rack -asrx // 1997 ASR-X +asrx // 1997 ASR-X // Fairchild channelf // Fairchild Channel F VES - 1976 @@ -451,7 +451,7 @@ apple2c0 // ??? 1985 Apple //c (3.5 ROM) apple2c3 // Sep 1986 Apple //c (Original Mem. Exp.) apple2c4 // ??? 198? Apple //c (rev 4) apple2cp // Sep 1988 Apple //c+ -apple2gsr0p // June 19, 1986 Apple IIgs ROM00 prototype +apple2gsr0p // June 19, 1986 Apple IIgs ROM00 prototype apple2gsr0 // Sep 1986 Apple IIgs ROM00 apple2gsr1 // Sep 1987 Apple IIgs ROM01 apple2gs // Aug 1989 Apple IIgs ROM03 @@ -1437,7 +1437,7 @@ vk100 // 1980 Digital Equipment Corporation dectalk // 1982 Digital Equipment Corporation mc7105 // Elektronika MC7105 rainbow // DEC Rainbow 100B -rainb190 // DEC Rainbow 190 +rainb190 // DEC Rainbow 190 // Memotech mtx512 // 1983 Memotech MTX 512 @@ -2311,4 +2311,3 @@ myvision mkit09 cpu09 ivg09 - diff --git a/src/mess/video/isa_cga.c b/src/mess/video/isa_cga.c index 27a01036d1..ea5030f90a 100644 --- a/src/mess/video/isa_cga.c +++ b/src/mess/video/isa_cga.c @@ -2151,7 +2151,7 @@ const rom_entry *isa8_ec1841_0002_device::device_rom_region() const WRITE8_MEMBER( isa8_ec1841_0002_device::char_ram_write ) { offset ^= BIT(offset, 12); -// logerror("write char ram %04x %02x\n",offset,data); +// logerror("write char ram %04x %02x\n",offset,data); m_chr_gen_base[offset + 0x0000] = data; m_chr_gen_base[offset + 0x0800] = data; m_chr_gen_base[offset + 0x1000] = data; diff --git a/src/mess/video/isa_cga.h b/src/mess/video/isa_cga.h index 74711175b8..9707048d96 100644 --- a/src/mess/video/isa_cga.h +++ b/src/mess/video/isa_cga.h @@ -18,7 +18,7 @@ class isa8_cga_device : public device_isa8_card_interface { friend class isa8_cga_superimpose_device; -// friend class isa8_ec1841_0002_device; +// friend class isa8_ec1841_0002_device; friend class isa8_cga_poisk2_device; friend class isa8_cga_pc1512_device; diff --git a/src/mess/video/pc_t1t.h b/src/mess/video/pc_t1t.h index 44c33735fc..f680139b49 100644 --- a/src/mess/video/pc_t1t.h +++ b/src/mess/video/pc_t1t.h @@ -14,7 +14,7 @@ struct reg index = 0; memset(&data, 0, sizeof(data)); } - + UINT8 index; UINT8 data[0x20]; /* see vgadoc @@ -35,8 +35,8 @@ public: pc_t1t_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); DECLARE_PALETTE_INIT( pcjr ); - - DECLARE_WRITE_LINE_MEMBER( t1000_de_changed ); + + DECLARE_WRITE_LINE_MEMBER( t1000_de_changed ); required_device m_mc6845; UINT8 m_mode_control, m_color_select; @@ -60,7 +60,7 @@ public: UINT8 m_display_enable; UINT8 m_vsync; UINT8 m_palette_base; - + int mode_control_r(void); void color_select_w(int data); int color_select_r(void); @@ -87,20 +87,20 @@ public: protected: virtual machine_config_constructor device_mconfig_additions() const; virtual void device_start(); - + private: UINT8 *m_t1_displayram; void mode_switch( void ); void vga_data_w(int data); void bank_w(int data); void mode_control_w(int data); -}; +}; extern const device_type PCVIDEO_T1000; #define MCFG_PCVIDEO_T1000_ADD(_tag) \ MCFG_DEVICE_ADD(_tag, PCVIDEO_T1000, 0) - + class pcvideo_pcjr_device : public pc_t1t_device { public: @@ -109,7 +109,7 @@ public: DECLARE_WRITE8_MEMBER( write ); DECLARE_WRITE_LINE_MEMBER( pcjr_vsync_changed ); - + UINT8 *m_jxkanji; protected: diff --git a/src/mess/video/poisk1.c b/src/mess/video/poisk1.c index eb1429fb51..c9df5aa828 100644 --- a/src/mess/video/poisk1.c +++ b/src/mess/video/poisk1.c @@ -82,12 +82,12 @@ WRITE8_MEMBER(p1_state::p1_vram_w) // CGA emulator /* -068h D42 0..2 R, G, B XXX Foreground/Background color - 3 NMI DISABLE NMI trap 1: Disabled 0: Enabled - 4 PALETTE XXX Colour palette 0: XXX 1: XXX - 5 I (INTENS) XXX Foreground/Background color intensity - 6 DISPLAY BANK XXX Video RAM page - 7 HIRES 1: 640x200 0: 320x200 +068h D42 0..2 R, G, B XXX Foreground/Background color + 3 NMI DISABLE NMI trap 1: Disabled 0: Enabled + 4 PALETTE XXX Colour palette 0: XXX 1: XXX + 5 I (INTENS) XXX Foreground/Background color intensity + 6 DISPLAY BANK XXX Video RAM page + 7 HIRES 1: 640x200 0: 320x200 */ WRITE8_MEMBER(p1_state::p1_ppi2_porta_w) @@ -125,8 +125,8 @@ WRITE8_MEMBER(p1_state::p1_ppi2_porta_w) } /* -06Ah Dxx 6 Enable/Disable color burst (?) - 7 Enable/Disable D7H/D7L +06Ah Dxx 6 Enable/Disable color burst (?) + 7 Enable/Disable D7H/D7L */ WRITE8_MEMBER(p1_state::p1_ppi_portc_w) @@ -151,13 +151,13 @@ void p1_state::set_palette_luts(void) } // B&W -- XXX /* - if ( m_video.mode_control_6a & 0x40 ) - { - m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3; - m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4; - m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7; - } - else + if ( m_video.mode_control_6a & 0x40 ) + { + m_video.palette_lut_2bpp[1] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 3; + m_video.palette_lut_2bpp[2] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 4; + m_video.palette_lut_2bpp[3] = ( ( m_video.color_select_68 & 0x20 ) >> 2 ) | 7; + } + else */ { // PALETTE diff --git a/src/mess/video/vtvideo.c b/src/mess/video/vtvideo.c index 08970cd494..15d91920cf 100644 --- a/src/mess/video/vtvideo.c +++ b/src/mess/video/vtvideo.c @@ -12,14 +12,14 @@ Split & full screen modes exist. Scroll should be synced with beam or DMA. See 4.7.4 and up in VT manual. - - TESTS REQUIRED : do line and character attributes (plus combinations) match real hardware? + - TESTS REQUIRED : do line and character attributes (plus combinations) match real hardware? - - UNDOCUMENTED FEATURES of DC011 / DC012 (CLUES WANTED) - A. (VT 100): DEC VT terminals are said to have a feature that doubles the number of lines - (50 real lines or just interlaced mode with 500 instead of 250 scanlines?) + - UNDOCUMENTED FEATURES of DC011 / DC012 (CLUES WANTED) + A. (VT 100): DEC VT terminals are said to have a feature that doubles the number of lines + (50 real lines or just interlaced mode with 500 instead of 250 scanlines?) - B. (DEC-100-B) fun PD program SQUEEZE.COM _compresses_ display to X/2 and Y/2 - - so picture takes a quarter of the original screen. How does it accomplish this? + B. (DEC-100-B) fun PD program SQUEEZE.COM _compresses_ display to X/2 and Y/2 + - so picture takes a quarter of the original screen. How does it accomplish this? - IMPROVEMENTS: - exact colors for different VR201 monitors ('paper white', green and amber) @@ -201,18 +201,18 @@ READ8_MEMBER( vt100_video_device::lba7_r ) // Also used by Rainbow-100 ************ WRITE8_MEMBER( vt100_video_device::dc012_w ) { - // TODO: writes to 10C/0C should be treated differently (emulation disables the watchdog too often). + // TODO: writes to 10C/0C should be treated differently (emulation disables the watchdog too often). if (data == 0) // MHFU is disabled by writing 00 to port 010C. - { + { //if (MHFU_FLAG == true) - // printf("MHFU *** DISABLED *** \n"); + // printf("MHFU *** DISABLED *** \n"); MHFU_FLAG = false; MHFU_counter = 0; } - else - { // RESET - //if (MHFU_FLAG == false) - // printf("MHFU ___ENABLED___ \n"); + else + { // RESET + //if (MHFU_FLAG == false) + // printf("MHFU ___ENABLED___ \n"); MHFU_FLAG = true; MHFU_counter = 0; @@ -224,10 +224,10 @@ WRITE8_MEMBER( vt100_video_device::dc012_w ) // The BIOS first writes the least significant bits, then the 2 most significant bits. // If scrolling up (incrementing the scroll latch), the additional line is linked in at the bottom. - // When the scroll latch is incremented back to 0, the top line of the scrolling region must be unlinked. + // When the scroll latch is incremented back to 0, the top line of the scrolling region must be unlinked. // When scrolling down (decrementing the scroll latch), new lines must be linked in at the top of the scroll region - // and unlinked down at the bottom. + // and unlinked down at the bottom. // Note that the scroll latch value will be used during the next frame rather than the current frame. // All line linking/unlinking is done during the vertical blanking interval (< 550ms). @@ -267,7 +267,7 @@ WRITE8_MEMBER( vt100_video_device::dc012_w ) m_reverse_field = 0; break; - // Writing a 11XX bit combination clears the blink-flip flop (valid for 0x0C - 0x0F): + // Writing a 11XX bit combination clears the blink-flip flop (valid for 0x0C - 0x0F): case 0x0c: // set basic attribute to underline / blink flip-flop off m_blink_flip_flop = 0; @@ -290,16 +290,16 @@ WRITE8_MEMBER( vt100_video_device::dc012_w ) case 0x0e: m_blink_flip_flop = 0; // 'unsupported' DC012 command. Turn blink flip-flop off. - break; + break; - case 0x0f: - // (DEC Rainbow 100): reverse video with 48 lines / blink flip-flop off + case 0x0f: + // (DEC Rainbow 100): reverse video with 48 lines / blink flip-flop off m_blink_flip_flop = 0; m_basic_attribute = 1; - // 0x0f = 'reserved' on VT 100 + // 0x0f = 'reserved' on VT 100 // Abort on VT-100 for now. - if (m_height_MAX == 25) break; + if (m_height_MAX == 25) break; if (m_height != 48) { @@ -485,10 +485,10 @@ void vt100_video_device::video_update(bitmap_ind16 &bitmap, const rectangle &cli // 2) bold and reverse together give a background of normal intensity // 3) blink controls intensity: normal chars vary between A) normal and dim (B) bold chars vary between bright and normal -// 4) blink applied to a +// 4) blink applied to a // A) reverse character causes it to alternate between normal and reverse video representation // B) non-rev. " : alternate between usual intensity and the next lower intensity -// 5) underline causes the 9.th scan to be forced to +// 5) underline causes the 9.th scan to be forced to // A) white of the same intensity as the characters (for nonreversed characters), // b) to black (for reverse characters) @@ -499,11 +499,11 @@ void rainbow_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x, UINT16 x_preset, d_x_preset; if (m_columns == 132) { x_preset = x * 9; - d_x_preset = x * 18; + d_x_preset = x * 18; } else { - x_preset = x * 10; - d_x_preset = x * 20; + x_preset = x * 10; + d_x_preset = x * 20; } UINT8 line = 0; @@ -512,24 +512,24 @@ void rainbow_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x, int back_intensity, back_default_intensity; int invert = (display_type & 8) >> 3; // BIT 3 indicates REVERSE - int bold = (display_type & 16) >> 4; // BIT 4 indicates BOLD + int bold = (display_type & 16) >> 4; // BIT 4 indicates BOLD int blink = display_type & 32; // BIT 5 indicates BLINK int underline = display_type & 64; // BIT 6 indicates UNDERLINE bool blank = (display_type & 0x80) ? true : false; // BIT 7 indicates BLANK display_type = display_type & 3; - // CASE 1 A) + // CASE 1 A) // SCREEN ATTRIBUTES (see VT-180 manual 6-30): // 'reverse field' = reverse video over entire screen (identical on Rainbow-100) - // What does 'base attribute' do on Rainbow-100 ? + // What does 'base attribute' do on Rainbow-100 ? // VT-100 interpretation ('without AVO, eigth char.bit defines base attribute') most likely not correct! // OR 'base attribute' = reverse or underline (depending on the selection of the cursor at SETUP) ?? // VT-100 manual 4-75 / 4-98 says: reverse = (reverse field H) XOR (reverse video H = base attribute input) // For reference: a complete truth table can be taken from TABLE 4-6-4 / VT100 technical manual. - // Following simple IF statements implement it in full. Code should not be shuffled! + // Following simple IF statements implement it in full. Code should not be shuffled! invert = invert ^ m_reverse_field ^ m_basic_attribute; fg_intensity = bold + 2; // FOREGROUND (FG): normal (2) or bright (3) @@ -540,21 +540,21 @@ void rainbow_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x, // INVERSION: background gets foreground intensity (reduced by 1). // _RELIES ON_ on_ previous evaluation of the BLINK signal (fg_intensity). - if (invert != 0) - { + if (invert != 0) + { back_intensity = fg_intensity - 1; // BG: normal => dim; dim => OFF; bright => normal if (back_intensity != 0) // FG: avoid 'black on black' - fg_intensity = 0; + fg_intensity = 0; else - fg_intensity = fg_intensity + 1; // FG: dim => normal; normal => bright + fg_intensity = fg_intensity + 1; // FG: dim => normal; normal => bright } // BG: DEFAULT for entire character (underline overrides this for 1 line) - back_default_intensity = back_intensity; bool double_width = (display_type != 3) ? true : false; // all except normal: double width - bool double_height = (display_type & 1) ? false : true; // 0,2 = double height + bool double_height = (display_type & 1) ? false : true; // 0,2 = double height for (int i = 0; i < 10; i++) { @@ -563,17 +563,17 @@ void rainbow_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x, switch (display_type) { case 0 : // bottom half of 'double height, double width' char. - j = (i >> 1) + 5; + j = (i >> 1) + 5; break; case 2 : // top half of 'double height, double width' char. - j = (i >> 1); + j = (i >> 1); break; - default : // 1: double width - // 3: normal - j = i; - break; + default : // 1: double width + // 3: normal + j = i; + break; } // modify line since that is how it is stored in rom @@ -582,25 +582,25 @@ void rainbow_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x, line = m_gfx[ (code << 4) + j]; // code * 16 // UNDERLINED CHARACTERS (CASE 5 - different in 1 line): - back_intensity = back_default_intensity; // 0, 1, 2 + back_intensity = back_default_intensity; // 0, 1, 2 if ( underline != 0 ) { - if ( i == 8 ) + if ( i == 8 ) { - if (invert == 0) - line = 0xff; // CASE 5 A) - else - { line = 0x00; // CASE 5 B) - back_intensity = 0; // OVERRIDE: BLACK BACKGROUND - } - } - } + if (invert == 0) + line = 0xff; // CASE 5 A) + else + { line = 0x00; // CASE 5 B) + back_intensity = 0; // OVERRIDE: BLACK BACKGROUND + } + } + } for (int b = 0; b < 8; b++) // 0..7 { if (blank) - { bit = m_reverse_field ^ m_basic_attribute; - } + { bit = m_reverse_field ^ m_basic_attribute; + } else { bit = BIT((line << b), 7); @@ -614,13 +614,13 @@ void rainbow_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x, // Double, 'double_height + double_width', then normal. if (double_width) { - bitmap.pix16( y_preset, d_x_preset + (b << 1) + 1) = bit; + bitmap.pix16( y_preset, d_x_preset + (b << 1) + 1) = bit; bitmap.pix16( y_preset, d_x_preset + (b << 1) ) = bit; if (double_height) { - bitmap.pix16( 1 + y_preset, d_x_preset + (b << 1) + 1) = bit; - bitmap.pix16( 1 + y_preset, d_x_preset + (b << 1) ) = bit; + bitmap.pix16( 1 + y_preset, d_x_preset + (b << 1) + 1) = bit; + bitmap.pix16( 1 + y_preset, d_x_preset + (b << 1) ) = bit; } } else @@ -629,24 +629,24 @@ void rainbow_video_device::display_char(bitmap_ind16 &bitmap, UINT8 code, int x, } } // for (8 bit) - + // char interleave (X) is filled with last bit if (double_width) - { + { // double chars: 18 or 20 bits bitmap.pix16(y_preset, d_x_preset + 16) = bit; bitmap.pix16(y_preset, d_x_preset + 17) = bit; - if (m_columns == 80) - { bitmap.pix16(y_preset, d_x_preset + 18) = bit; - bitmap.pix16(y_preset, d_x_preset + 19) = bit; + if (m_columns == 80) + { bitmap.pix16(y_preset, d_x_preset + 18) = bit; + bitmap.pix16(y_preset, d_x_preset + 19) = bit; } } else { // normal chars: 9 or 10 bits bitmap.pix16(y_preset, x_preset + 8) = bit; - if (m_columns == 80) + if (m_columns == 80) bitmap.pix16(y_preset, x_preset + 9) = bit; } @@ -671,11 +671,11 @@ void rainbow_video_device::video_update(bitmap_ind16 &bitmap, const rectangle &c while (line < (m_height + m_skip_lines)) { code = m_in_ram_func(addr + xpos); - - if ( code == 0x00 ) // TODO: investigate side effect on regular zero character! - display_type |= 0x80; // DEFAULT: filler chars (till end of line) and empty lines (00) will be blanked + + if ( code == 0x00 ) // TODO: investigate side effect on regular zero character! + display_type |= 0x80; // DEFAULT: filler chars (till end of line) and empty lines (00) will be blanked else - display_type &= 0x7f; // else activate display. + display_type &= 0x7f; // else activate display. if ( code == 0xff ) { @@ -709,7 +709,7 @@ void rainbow_video_device::video_update(bitmap_ind16 &bitmap, const rectangle &c line++; } else - { + { // display regular char if (line >= m_skip_lines) { @@ -722,12 +722,12 @@ void rainbow_video_device::video_update(bitmap_ind16 &bitmap, const rectangle &c // 0 = display char. w. BLINK (encoded as 32) // 0 = display char. w. UNDERLINE (encoded as 64). display_char(bitmap, code, xpos, ypos, scroll_region, display_type | ( ( (temp & 1)) << 3 ) - | ( (2-(temp & 2)) << 3 ) - | ( (4-(temp & 4)) << 3 ) - | ( (8-(temp & 8)) << 3 ) + | ( (2-(temp & 2)) << 3 ) + | ( (4-(temp & 4)) << 3 ) + | ( (8-(temp & 8)) << 3 ) ); - } + } xpos++; if (xpos > m_columns ) @@ -738,29 +738,29 @@ void rainbow_video_device::video_update(bitmap_ind16 &bitmap, const rectangle &c } // (else) valid char } // while - + } - + void rainbow_video_device::palette_select ( int choice ) { switch(choice) { - default: - case 0x01: + default: + case 0x01: palette_set_color_rgb(machine(), 1, 0xff-100, 0xff-100, 0xff-100); // WHITE (dim) palette_set_color_rgb(machine(), 2, 0xff-50, 0xff-50, 0xff-50); // WHITE NORMAL - palette_set_color_rgb(machine(), 3, 0xff, 0xff, 0xff); // WHITE (brighter) + palette_set_color_rgb(machine(), 3, 0xff, 0xff, 0xff); // WHITE (brighter) break; case 0x02: palette_set_color_rgb(machine(), 1, 0 , 205 -50, 100 - 50); // GREEN (dim) - palette_set_color_rgb(machine(), 2, 0 , 205, 100 ); // GREEN (NORMAL) + palette_set_color_rgb(machine(), 2, 0 , 205, 100 ); // GREEN (NORMAL) palette_set_color_rgb(machine(), 3, 0, 205 +50, 100 + 50); // GREEN (brighter) break; - case 0x03: + case 0x03: palette_set_color_rgb(machine(), 1, 213 - 47, 146 - 47, 82 - 47); // AMBER (dim) palette_set_color_rgb(machine(), 2, 213, 146, 82 ); // AMBER (NORMAL) palette_set_color_rgb(machine(), 3, 255, 193, 129 ); // AMBER (brighter) @@ -772,8 +772,8 @@ void rainbow_video_device::palette_select ( int choice ) void rainbow_video_device::video_blanking(bitmap_ind16 &bitmap, const rectangle &cliprect) { // 'In reverse screen mode, termination forces the beam to the screen background intensity' - // Background intensity means 'dim' (1) according to one source. - bitmap.fill( ((m_reverse_field ^ m_basic_attribute) ? 1 : 0) , cliprect); + // Background intensity means 'dim' (1) according to one source. + bitmap.fill( ((m_reverse_field ^ m_basic_attribute) ? 1 : 0) , cliprect); } @@ -781,21 +781,21 @@ void rainbow_video_device::video_blanking(bitmap_ind16 &bitmap, const rectangle int rainbow_video_device::MHFU(int ASK) { switch (ASK) - { - case 1: // "true": RETURN BOOLEAN (MHFU disabled or enabled?) + { + case 1: // "true": RETURN BOOLEAN (MHFU disabled or enabled?) return MHFU_FLAG; - case -1: // -1: increment, return counter value (=> Rainbow.c) - if (MHFU_FLAG == true) - MHFU_counter++; + case -1: // -1: increment, return counter value (=> Rainbow.c) + if (MHFU_FLAG == true) + MHFU_counter++; return MHFU_counter; - case -100: // -100 : RESET and ENABLE MHFU counter - //printf("-100 MHFU * reset and ENABLE * \n"); + case -100: // -100 : RESET and ENABLE MHFU counter + //printf("-100 MHFU * reset and ENABLE * \n"); MHFU_counter = 0; - //if (MHFU_FLAG == false) - // printf("-100 MHFU ___ENABLED___\n"); + //if (MHFU_FLAG == false) + // printf("-100 MHFU ___ENABLED___\n"); MHFU_FLAG = true; return -100; diff --git a/src/osd/windows/drawd3d.c b/src/osd/windows/drawd3d.c index 1449f1c5d5..4d40c31f58 100644 --- a/src/osd/windows/drawd3d.c +++ b/src/osd/windows/drawd3d.c @@ -777,7 +777,7 @@ mtlog_add("drawd3d_window_draw: begin_scene"); } m_line_count = 0; - + // loop over primitives for (render_primitive *prim = m_window->primlist->first(); prim != NULL; prim = prim->next()) if (prim->type == render_primitive::LINE && PRIMFLAG_GET_VECTOR(prim->flags)) @@ -1485,7 +1485,7 @@ void renderer::batch_vectors() { start_index %= m_line_count; } - + m_line_count = 0; } diff --git a/src/osd/windows/vconv.c b/src/osd/windows/vconv.c index 9ea78a72bc..b2ab34ae82 100644 --- a/src/osd/windows/vconv.c +++ b/src/osd/windows/vconv.c @@ -318,7 +318,7 @@ static void build_command_line(int argc, char *argv[]) else if (!strcmp(argv[1], "ar")) { transtable = ar_translate; - + if (!icl_compile) { executable = "link.exe"; diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c index 7ad99758ef..74a0bbc222 100644 --- a/src/osd/windows/window.c +++ b/src/osd/windows/window.c @@ -1347,7 +1347,7 @@ LRESULT CALLBACK winwindow_video_window_proc(HWND wnd, UINT message, WPARAM wpar case WM_SYSCOMMAND: { UINT16 cmd = wparam & 0xfff0; - + // prevent screensaver or monitor power events if (cmd == SC_MONITORPOWER || cmd == SC_SCREENSAVE) return 1; diff --git a/src/tools/jedutil.c b/src/tools/jedutil.c index fe3b52e7fe..c5f8233dae 100644 --- a/src/tools/jedutil.c +++ b/src/tools/jedutil.c @@ -232,7 +232,7 @@ typedef UINT16 (*get_pin_fuse_state_func)(const pal_data* pal, const jed_data* j struct _pal_data { const char *name; - UINT32 numfuses; + UINT32 numfuses; const pin_fuse_rows *pinfuserows; UINT16 pinfuserowscount; const pin_fuse_columns *pinfusecolumns; @@ -698,7 +698,7 @@ static pin_fuse_rows epl16p8pinfuserows[] = { static pin_fuse_rows epl16rp8pinfuserows[] = { {12, NO_OUTPUT_ENABLE_FUSE_ROW, 1792, 2016}, /* Registered Output */ {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760}, /* Registered Output */ - {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, /* Registered Output */ + {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, /* Registered Output */ {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, /* Registered Output */ {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, /* Registered Output */ {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, /* Registered Output */ @@ -795,118 +795,118 @@ static pin_fuse_rows pal16rp8pinfuserows[] = { {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}}; /* Registered Output */ static pin_fuse_rows pal6l16pinfuserows[] = { - {1, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 0}, - {2, NO_OUTPUT_ENABLE_FUSE_ROW, 24, 24}, - {3, NO_OUTPUT_ENABLE_FUSE_ROW, 36, 36}, - {10, NO_OUTPUT_ENABLE_FUSE_ROW, 132, 132}, - {11, NO_OUTPUT_ENABLE_FUSE_ROW, 168, 168}, - {13, NO_OUTPUT_ENABLE_FUSE_ROW, 180, 180}, - {14, NO_OUTPUT_ENABLE_FUSE_ROW, 156, 156}, - {15, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 144}, - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 120, 120}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 108, 108}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 96}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 84, 84}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 72, 72}, - {21, NO_OUTPUT_ENABLE_FUSE_ROW, 60, 60}, - {22, NO_OUTPUT_ENABLE_FUSE_ROW, 48, 48}, - {23, NO_OUTPUT_ENABLE_FUSE_ROW, 12, 12}}; + {1, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 0}, + {2, NO_OUTPUT_ENABLE_FUSE_ROW, 24, 24}, + {3, NO_OUTPUT_ENABLE_FUSE_ROW, 36, 36}, + {10, NO_OUTPUT_ENABLE_FUSE_ROW, 132, 132}, + {11, NO_OUTPUT_ENABLE_FUSE_ROW, 168, 168}, + {13, NO_OUTPUT_ENABLE_FUSE_ROW, 180, 180}, + {14, NO_OUTPUT_ENABLE_FUSE_ROW, 156, 156}, + {15, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 144}, + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 120, 120}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 108, 108}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 96}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 84, 84}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 72, 72}, + {21, NO_OUTPUT_ENABLE_FUSE_ROW, 60, 60}, + {22, NO_OUTPUT_ENABLE_FUSE_ROW, 48, 48}, + {23, NO_OUTPUT_ENABLE_FUSE_ROW, 12, 12}}; static pin_fuse_rows pal8l14pinfuserows[] = { - {1, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 0}, - {2, NO_OUTPUT_ENABLE_FUSE_ROW, 32, 32}, - {11, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 192}, - {13, NO_OUTPUT_ENABLE_FUSE_ROW, 208, 208}, - {14, NO_OUTPUT_ENABLE_FUSE_ROW, 176, 176}, - {15, NO_OUTPUT_ENABLE_FUSE_ROW, 160, 160}, - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 144}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 128, 128}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 112}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 96}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 80, 80}, - {21, NO_OUTPUT_ENABLE_FUSE_ROW, 64, 64}, - {22, NO_OUTPUT_ENABLE_FUSE_ROW, 48, 48}, - {23, NO_OUTPUT_ENABLE_FUSE_ROW, 16, 16}}; + {1, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 0}, + {2, NO_OUTPUT_ENABLE_FUSE_ROW, 32, 32}, + {11, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 192}, + {13, NO_OUTPUT_ENABLE_FUSE_ROW, 208, 208}, + {14, NO_OUTPUT_ENABLE_FUSE_ROW, 176, 176}, + {15, NO_OUTPUT_ENABLE_FUSE_ROW, 160, 160}, + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 144}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 128, 128}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 112}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 96}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 80, 80}, + {21, NO_OUTPUT_ENABLE_FUSE_ROW, 64, 64}, + {22, NO_OUTPUT_ENABLE_FUSE_ROW, 48, 48}, + {23, NO_OUTPUT_ENABLE_FUSE_ROW, 16, 16}}; static pin_fuse_rows pal12h10pinfuserows[] = { - {14, NO_OUTPUT_ENABLE_FUSE_ROW, 432, 456}, - {15, NO_OUTPUT_ENABLE_FUSE_ROW, 384, 408}, - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 360}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 288, 312}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 264}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 216}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 168}, - {21, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 120}, - {22, NO_OUTPUT_ENABLE_FUSE_ROW, 48, 72}, - {23, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 24}}; + {14, NO_OUTPUT_ENABLE_FUSE_ROW, 432, 456}, + {15, NO_OUTPUT_ENABLE_FUSE_ROW, 384, 408}, + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 360}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 288, 312}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 264}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 216}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 168}, + {21, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 120}, + {22, NO_OUTPUT_ENABLE_FUSE_ROW, 48, 72}, + {23, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 24}}; static pin_fuse_rows pal12l10pinfuserows[] = { - {14, NO_OUTPUT_ENABLE_FUSE_ROW, 432, 456}, - {15, NO_OUTPUT_ENABLE_FUSE_ROW, 384, 408}, - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 360}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 288, 312}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 264}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 216}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 168}, - {21, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 120}, - {22, NO_OUTPUT_ENABLE_FUSE_ROW, 48, 72}, - {23, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 24}}; + {14, NO_OUTPUT_ENABLE_FUSE_ROW, 432, 456}, + {15, NO_OUTPUT_ENABLE_FUSE_ROW, 384, 408}, + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 360}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 288, 312}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 240, 264}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 192, 216}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 144, 168}, + {21, NO_OUTPUT_ENABLE_FUSE_ROW, 96, 120}, + {22, NO_OUTPUT_ENABLE_FUSE_ROW, 48, 72}, + {23, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 24}}; static pin_fuse_rows pal14h8pinfuserows[] = { - {15, NO_OUTPUT_ENABLE_FUSE_ROW, 448, 532}, - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 392, 420}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 364}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 280, 308}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 224, 252}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 168, 196}, - {21, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 140}, - {22, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 84}}; + {15, NO_OUTPUT_ENABLE_FUSE_ROW, 448, 532}, + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 392, 420}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 364}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 280, 308}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 224, 252}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 168, 196}, + {21, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 140}, + {22, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 84}}; static pin_fuse_rows pal14l8pinfuserows[] = { - {15, NO_OUTPUT_ENABLE_FUSE_ROW, 448, 532}, - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 392, 420}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 364}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 280, 308}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 224, 252}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 168, 196}, - {21, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 140}, - {22, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 84}}; + {15, NO_OUTPUT_ENABLE_FUSE_ROW, 448, 532}, + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 392, 420}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 336, 364}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 280, 308}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 224, 252}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 168, 196}, + {21, NO_OUTPUT_ENABLE_FUSE_ROW, 112, 140}, + {22, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 84}}; static pin_fuse_rows pal16h6pinfuserows[] = { - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 608}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 384, 480}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 352}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 288}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 128, 224}, - {21, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 96}}; + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 608}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 384, 480}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 352}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 288}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 128, 224}, + {21, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 96}}; static pin_fuse_rows pal16l6pinfuserows[] = { - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 608}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 384, 480}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 352}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 288}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 128, 224}, - {21, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 96}}; + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 608}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 384, 480}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 352}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 288}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 128, 224}, + {21, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 96}}; static pin_fuse_rows pal18h4pinfuserows[] = { - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 504, 684}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 360, 468}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 216, 324}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 180}}; + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 504, 684}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 360, 468}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 216, 324}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 180}}; static pin_fuse_rows pal18l4pinfuserows[] = { - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 504, 684}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 360, 468}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 216, 324}, - {20, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 180}}; + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 504, 684}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 360, 468}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 216, 324}, + {20, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 180}}; static pin_fuse_rows pal20c1pinfuserows[] = { - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 280}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 600}}; + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 280}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 600}}; static pin_fuse_rows pal20l2pinfuserows[] = { - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 600}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 280}}; + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 320, 600}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 280}}; static pin_fuse_columns pal10l8pinfusecolumns[] = { {1, 3, 2}, @@ -1501,10 +1501,10 @@ static pin_fuse_columns epl16rp8pinfusecolumns[] = { {9, 29, 28}, {12, 31, 30}, {13, 27, 26}, - {14, 23, 22}, - {15, 19, 18}, - {16, 15, 14}, - {17, 11, 10}, + {14, 23, 22}, + {15, 19, 18}, + {16, 15, 14}, + {17, 11, 10}, {18, 7, 6}, {19, 3, 2}}; @@ -1519,10 +1519,10 @@ static pin_fuse_columns epl16rp6pinfusecolumns[] = { {9, 29, 28}, {12, 31, 30}, {13, 27, 26}, - {14, 23, 22}, - {15, 19, 18}, - {16, 15, 14}, - {17, 11, 10}, + {14, 23, 22}, + {15, 19, 18}, + {16, 15, 14}, + {17, 11, 10}, {18, 7, 6}, {19, 3, 2}}; @@ -1674,202 +1674,202 @@ static pin_fuse_columns pal16rp8pinfusecolumns[] = { {19, 3, 2}}; /* Registered Output */ static pin_fuse_columns pal6l16pinfusecolumns[] = { - {4, 1, 0}, - {5, 3, 2}, - {6, 5, 4}, - {7, 7, 6}, - {8, 9, 8}, - {9, 11, 10}}; + {4, 1, 0}, + {5, 3, 2}, + {6, 5, 4}, + {7, 7, 6}, + {8, 9, 8}, + {9, 11, 10}}; static pin_fuse_columns pal8l14pinfusecolumns[] = { - {3, 1, 0}, - {4, 3, 2}, - {5, 5, 4}, - {6, 7, 6}, - {7, 9, 8}, - {8, 11, 10}, - {9, 13, 12}, - {10, 15, 14}}; + {3, 1, 0}, + {4, 3, 2}, + {5, 5, 4}, + {6, 7, 6}, + {7, 9, 8}, + {8, 11, 10}, + {9, 13, 12}, + {10, 15, 14}}; static pin_fuse_columns pal12h10pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 7, 6}, - {5, 9, 8}, - {6, 11, 10}, - {7, 13, 12}, - {8, 15, 14}, - {9, 17, 16}, - {10, 19, 18}, - {11, 21, 20}, - {13, 23, 22}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 7, 6}, + {5, 9, 8}, + {6, 11, 10}, + {7, 13, 12}, + {8, 15, 14}, + {9, 17, 16}, + {10, 19, 18}, + {11, 21, 20}, + {13, 23, 22}}; static pin_fuse_columns pal12l10pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 7, 6}, - {5, 9, 8}, - {6, 11, 10}, - {7, 13, 12}, - {8, 15, 14}, - {9, 17, 16}, - {10, 19, 18}, - {11, 21, 20}, - {13, 23, 22}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 7, 6}, + {5, 9, 8}, + {6, 11, 10}, + {7, 13, 12}, + {8, 15, 14}, + {9, 17, 16}, + {10, 19, 18}, + {11, 21, 20}, + {13, 23, 22}}; static pin_fuse_columns pal14h8pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 11, 10}, - {6, 13, 12}, - {7, 15, 14}, - {8, 17, 16}, - {9, 19, 18}, - {10, 21, 20}, - {11, 25, 24}, - {13, 27, 26}, - {14, 23, 22}, - {23, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 11, 10}, + {6, 13, 12}, + {7, 15, 14}, + {8, 17, 16}, + {9, 19, 18}, + {10, 21, 20}, + {11, 25, 24}, + {13, 27, 26}, + {14, 23, 22}, + {23, 7, 6}}; static pin_fuse_columns pal14l8pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 11, 10}, - {6, 13, 12}, - {7, 15, 14}, - {8, 17, 16}, - {9, 19, 18}, - {10, 21, 20}, - {11, 25, 24}, - {13, 27, 26}, - {14, 23, 22}, - {23, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 11, 10}, + {6, 13, 12}, + {7, 15, 14}, + {8, 17, 16}, + {9, 19, 18}, + {10, 21, 20}, + {11, 25, 24}, + {13, 27, 26}, + {14, 23, 22}, + {23, 7, 6}}; static pin_fuse_columns pal16h6pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 15, 14}, - {7, 17, 16}, - {8, 19, 18}, - {9, 21, 20}, - {10, 25, 24}, - {11, 29, 28}, - {13, 31, 30}, - {14, 27, 26}, - {15, 23, 22}, - {22, 11, 10}, - {23, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 15, 14}, + {7, 17, 16}, + {8, 19, 18}, + {9, 21, 20}, + {10, 25, 24}, + {11, 29, 28}, + {13, 31, 30}, + {14, 27, 26}, + {15, 23, 22}, + {22, 11, 10}, + {23, 7, 6}}; static pin_fuse_columns pal16l6pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 15, 14}, - {7, 17, 16}, - {8, 19, 18}, - {9, 21, 20}, - {10, 25, 24}, - {11, 29, 28}, - {13, 31, 30}, - {14, 27, 26}, - {15, 23, 22}, - {22, 11, 10}, - {23, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 15, 14}, + {7, 17, 16}, + {8, 19, 18}, + {9, 21, 20}, + {10, 25, 24}, + {11, 29, 28}, + {13, 31, 30}, + {14, 27, 26}, + {15, 23, 22}, + {22, 11, 10}, + {23, 7, 6}}; static pin_fuse_columns pal18h4pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 17, 16}, - {7, 19, 18}, - {8, 21, 20}, - {9, 25, 24}, - {10, 29, 28}, - {11, 33, 32}, - {13, 35, 34}, - {14, 31, 30}, - {15, 27, 26}, - {16, 23, 22}, - {21, 15, 14}, - {22, 11, 10}, - {23, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 17, 16}, + {7, 19, 18}, + {8, 21, 20}, + {9, 25, 24}, + {10, 29, 28}, + {11, 33, 32}, + {13, 35, 34}, + {14, 31, 30}, + {15, 27, 26}, + {16, 23, 22}, + {21, 15, 14}, + {22, 11, 10}, + {23, 7, 6}}; static pin_fuse_columns pal18l4pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 17, 16}, - {7, 19, 18}, - {8, 21, 20}, - {9, 25, 24}, - {10, 29, 28}, - {11, 33, 32}, - {13, 35, 34}, - {14, 31, 30}, - {15, 27, 26}, - {16, 23, 22}, - {21, 15, 14}, - {22, 11, 10}, - {23, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 17, 16}, + {7, 19, 18}, + {8, 21, 20}, + {9, 25, 24}, + {10, 29, 28}, + {11, 33, 32}, + {13, 35, 34}, + {14, 31, 30}, + {15, 27, 26}, + {16, 23, 22}, + {21, 15, 14}, + {22, 11, 10}, + {23, 7, 6}}; static pin_fuse_columns pal20c1pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 17, 16}, - {7, 21, 20}, - {8, 25, 24}, - {9, 29, 28}, - {10, 33, 32}, - {11, 37, 36}, - {13, 39, 38}, - {14, 35, 34}, - {15, 31, 30}, - {16, 27, 26}, - {17, 23, 22}, - {20, 19, 18}, - {21, 15, 14}, - {22, 11, 10}, - {23, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 17, 16}, + {7, 21, 20}, + {8, 25, 24}, + {9, 29, 28}, + {10, 33, 32}, + {11, 37, 36}, + {13, 39, 38}, + {14, 35, 34}, + {15, 31, 30}, + {16, 27, 26}, + {17, 23, 22}, + {20, 19, 18}, + {21, 15, 14}, + {22, 11, 10}, + {23, 7, 6}}; static pin_fuse_columns pal20l2pinfusecolumns[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 17, 16}, - {7, 21, 20}, - {8, 25, 24}, - {9, 29, 28}, - {10, 33, 32}, - {11, 37, 36}, - {13, 39, 38}, - {14, 35, 34}, - {15, 31, 30}, - {16, 27, 26}, - {17, 23, 22}, - {20, 19, 18}, - {21, 15, 14}, - {22, 11, 10}, - {23, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 17, 16}, + {7, 21, 20}, + {8, 25, 24}, + {9, 29, 28}, + {10, 33, 32}, + {11, 37, 36}, + {13, 39, 38}, + {14, 35, 34}, + {15, 31, 30}, + {16, 27, 26}, + {17, 23, 22}, + {20, 19, 18}, + {21, 15, 14}, + {22, 11, 10}, + {23, 7, 6}}; static pal_data paldata[] = { {"PAL10L8", 320, @@ -2124,14 +2124,14 @@ static pal_data paldata[] = { print_epl16rp6_product_terms, config_epl16rp6_pins, NULL, - NULL}, + NULL}, {"EPL16RP4", 2072, epl16rp4pinfuserows, ARRAY_LEN(epl16rp4pinfuserows), epl16rp4pinfusecolumns, ARRAY_LEN(epl16rp4pinfusecolumns), print_epl16rp4_product_terms, config_epl16rp4_pins, NULL, - NULL}, + NULL}, #endif {"PAL10P8", 328, pal10p8pinfuserows, ARRAY_LEN(pal10p8pinfuserows), @@ -2139,140 +2139,140 @@ static pal_data paldata[] = { print_pal10p8_product_terms, config_pal10p8_pins, NULL, - NULL}, + NULL}, {"PAL12P6", 390, pal12p6pinfuserows, ARRAY_LEN(pal12p6pinfuserows), pal12p6pinfusecolumns, ARRAY_LEN(pal12p6pinfusecolumns), print_pal12p6_product_terms, config_pal12p6_pins, NULL, - NULL}, + NULL}, {"PAL14P4", 452, pal14p4pinfuserows, ARRAY_LEN(pal14p4pinfuserows), pal14p4pinfusecolumns, ARRAY_LEN(pal14p4pinfusecolumns), print_pal14p4_product_terms, config_pal14p4_pins, NULL, - NULL}, + NULL}, {"PAL16P2", 514, pal16p2pinfuserows, ARRAY_LEN(pal16p2pinfuserows), pal16p2pinfusecolumns, ARRAY_LEN(pal16p2pinfusecolumns), print_pal16p2_product_terms, config_pal16p2_pins, NULL, - NULL}, + NULL}, {"PAL16P8", 2056, pal16p8pinfuserows, ARRAY_LEN(pal16p8pinfuserows), pal16p8pinfusecolumns, ARRAY_LEN(pal16p8pinfusecolumns), print_pal16p8_product_terms, - config_pal16p8_pins, - NULL, - NULL}, + config_pal16p8_pins, + NULL, + NULL}, {"PAL16RP4", 2056, pal16rp4pinfuserows, ARRAY_LEN(pal16rp4pinfuserows), pal16rp4pinfusecolumns, ARRAY_LEN(pal16rp4pinfusecolumns), print_pal16rp4_product_terms, - config_pal16rp4_pins, - NULL, - NULL}, + config_pal16rp4_pins, + NULL, + NULL}, {"PAL16RP6", 2056, pal16rp6pinfuserows, ARRAY_LEN(pal16rp6pinfuserows), pal16rp6pinfusecolumns, ARRAY_LEN(pal16rp6pinfusecolumns), print_pal16rp6_product_terms, - config_pal16rp6_pins, - NULL, - NULL}, + config_pal16rp6_pins, + NULL, + NULL}, {"PAL16RP8", 2056, pal16rp8pinfuserows, ARRAY_LEN(pal16rp8pinfuserows), pal16rp8pinfusecolumns, ARRAY_LEN(pal16rp8pinfusecolumns), print_pal16rp8_product_terms, - config_pal16rp8_pins, - NULL, - NULL}, - {"PAL6L16", 192, - pal6l16pinfuserows, ARRAY_LEN(pal6l16pinfuserows), - pal6l16pinfusecolumns, ARRAY_LEN(pal6l16pinfusecolumns), - print_pal6l16_product_terms, - config_pal6l16_pins, - NULL, - NULL}, - {"PAL8L14", 224, - pal8l14pinfuserows, ARRAY_LEN(pal8l14pinfuserows), - pal8l14pinfusecolumns, ARRAY_LEN(pal8l14pinfusecolumns), - print_pal8l14_product_terms, - config_pal8l14_pins, - NULL, - NULL}, - {"PAL12H10", 480, - pal12h10pinfuserows, ARRAY_LEN(pal12h10pinfuserows), - pal12h10pinfusecolumns, ARRAY_LEN(pal12h10pinfusecolumns), - print_pal12h10_product_terms, - config_pal12h10_pins, - NULL, - NULL}, - {"PAL12L10", 480, - pal12l10pinfuserows, ARRAY_LEN(pal12l10pinfuserows), - pal12l10pinfusecolumns, ARRAY_LEN(pal12l10pinfusecolumns), - print_pal12l10_product_terms, - config_pal12l10_pins, - NULL, - NULL}, - {"PAL14H8", 560, - pal14h8pinfuserows, ARRAY_LEN(pal14h8pinfuserows), - pal14h8pinfusecolumns, ARRAY_LEN(pal14h8pinfusecolumns), - print_pal14h8_product_terms, - config_pal14h8_pins, - NULL, - NULL}, - {"PAL14L8", 560, - pal14l8pinfuserows, ARRAY_LEN(pal14l8pinfuserows), - pal14l8pinfusecolumns, ARRAY_LEN(pal14l8pinfusecolumns), - print_pal14l8_product_terms, - config_pal14l8_pins, - NULL, - NULL}, - {"PAL16H6", 640, - pal16h6pinfuserows, ARRAY_LEN(pal16h6pinfuserows), - pal16h6pinfusecolumns, ARRAY_LEN(pal16h6pinfusecolumns), - print_pal16h6_product_terms, - config_pal16h6_pins, - NULL, - NULL}, - {"PAL16L6", 640, - pal16l6pinfuserows, ARRAY_LEN(pal16l6pinfuserows), - pal16l6pinfusecolumns, ARRAY_LEN(pal16l6pinfusecolumns), - print_pal16l6_product_terms, - config_pal16l6_pins, - NULL, - NULL}, - {"PAL18H4", 720, - pal18h4pinfuserows, ARRAY_LEN(pal18h4pinfuserows), - pal18h4pinfusecolumns, ARRAY_LEN(pal18h4pinfusecolumns), - print_pal18h4_product_terms, - config_pal18h4_pins, - NULL, - NULL}, - {"PAL18L4", 720, - pal18l4pinfuserows, ARRAY_LEN(pal18l4pinfuserows), - pal18l4pinfusecolumns, ARRAY_LEN(pal18l4pinfusecolumns), - print_pal18l4_product_terms, - config_pal18l4_pins, - NULL, - NULL}, - {"PAL20C1", 640, - pal20c1pinfuserows, ARRAY_LEN(pal20c1pinfuserows), - pal20c1pinfusecolumns, ARRAY_LEN(pal20c1pinfusecolumns), - print_pal20c1_product_terms, - config_pal20c1_pins, - NULL, - NULL}, - {"PAL20L2", 640, - pal20l2pinfuserows, ARRAY_LEN(pal20l2pinfuserows), - pal20l2pinfusecolumns, ARRAY_LEN(pal20l2pinfusecolumns), - print_pal20l2_product_terms, - config_pal20l2_pins, - NULL, - NULL}}; + config_pal16rp8_pins, + NULL, + NULL}, + {"PAL6L16", 192, + pal6l16pinfuserows, ARRAY_LEN(pal6l16pinfuserows), + pal6l16pinfusecolumns, ARRAY_LEN(pal6l16pinfusecolumns), + print_pal6l16_product_terms, + config_pal6l16_pins, + NULL, + NULL}, + {"PAL8L14", 224, + pal8l14pinfuserows, ARRAY_LEN(pal8l14pinfuserows), + pal8l14pinfusecolumns, ARRAY_LEN(pal8l14pinfusecolumns), + print_pal8l14_product_terms, + config_pal8l14_pins, + NULL, + NULL}, + {"PAL12H10", 480, + pal12h10pinfuserows, ARRAY_LEN(pal12h10pinfuserows), + pal12h10pinfusecolumns, ARRAY_LEN(pal12h10pinfusecolumns), + print_pal12h10_product_terms, + config_pal12h10_pins, + NULL, + NULL}, + {"PAL12L10", 480, + pal12l10pinfuserows, ARRAY_LEN(pal12l10pinfuserows), + pal12l10pinfusecolumns, ARRAY_LEN(pal12l10pinfusecolumns), + print_pal12l10_product_terms, + config_pal12l10_pins, + NULL, + NULL}, + {"PAL14H8", 560, + pal14h8pinfuserows, ARRAY_LEN(pal14h8pinfuserows), + pal14h8pinfusecolumns, ARRAY_LEN(pal14h8pinfusecolumns), + print_pal14h8_product_terms, + config_pal14h8_pins, + NULL, + NULL}, + {"PAL14L8", 560, + pal14l8pinfuserows, ARRAY_LEN(pal14l8pinfuserows), + pal14l8pinfusecolumns, ARRAY_LEN(pal14l8pinfusecolumns), + print_pal14l8_product_terms, + config_pal14l8_pins, + NULL, + NULL}, + {"PAL16H6", 640, + pal16h6pinfuserows, ARRAY_LEN(pal16h6pinfuserows), + pal16h6pinfusecolumns, ARRAY_LEN(pal16h6pinfusecolumns), + print_pal16h6_product_terms, + config_pal16h6_pins, + NULL, + NULL}, + {"PAL16L6", 640, + pal16l6pinfuserows, ARRAY_LEN(pal16l6pinfuserows), + pal16l6pinfusecolumns, ARRAY_LEN(pal16l6pinfusecolumns), + print_pal16l6_product_terms, + config_pal16l6_pins, + NULL, + NULL}, + {"PAL18H4", 720, + pal18h4pinfuserows, ARRAY_LEN(pal18h4pinfuserows), + pal18h4pinfusecolumns, ARRAY_LEN(pal18h4pinfusecolumns), + print_pal18h4_product_terms, + config_pal18h4_pins, + NULL, + NULL}, + {"PAL18L4", 720, + pal18l4pinfuserows, ARRAY_LEN(pal18l4pinfuserows), + pal18l4pinfusecolumns, ARRAY_LEN(pal18l4pinfusecolumns), + print_pal18l4_product_terms, + config_pal18l4_pins, + NULL, + NULL}, + {"PAL20C1", 640, + pal20c1pinfuserows, ARRAY_LEN(pal20c1pinfuserows), + pal20c1pinfusecolumns, ARRAY_LEN(pal20c1pinfusecolumns), + print_pal20c1_product_terms, + config_pal20c1_pins, + NULL, + NULL}, + {"PAL20L2", 640, + pal20l2pinfuserows, ARRAY_LEN(pal20l2pinfuserows), + pal20l2pinfusecolumns, ARRAY_LEN(pal20l2pinfusecolumns), + print_pal20l2_product_terms, + config_pal20l2_pins, + NULL, + NULL}}; /*************************************************************************** CORE IMPLEMENTATION @@ -2976,28 +2976,28 @@ static void print_product_terms(const pal_data* pal, const jed_data* jed) static void config_palce16v8_pin_as_7_product_terms_and_oe_term(UINT16 pin) { - static pin_fuse_rows pinfuserows[] = { - {12, 1792, 1824, 2016}, - {13, 1536, 1568, 1760}, - {14, 1280, 1312, 1504}, - {15, 1024, 1056, 1248}, - {16, 768, 800, 992}, - {17, 512, 544, 736}, - {18, 256, 288, 480}, - {19, 0, 32, 224}}; - UINT16 index; + static pin_fuse_rows pinfuserows[] = { + {12, 1792, 1824, 2016}, + {13, 1536, 1568, 1760}, + {14, 1280, 1312, 1504}, + {15, 1024, 1056, 1248}, + {16, 768, 800, 992}, + {17, 512, 544, 736}, + {18, 256, 288, 480}, + {19, 0, 32, 224}}; + UINT16 index; - for (index = 0; index < ARRAY_LEN(pinfuserows); ++index) - { - if (pinfuserows[index].pin == pin) - { - palce16v8pinfuserows[index].fuserowoutputenable = pinfuserows[index].fuserowoutputenable; - palce16v8pinfuserows[index].fuserowtermstart = pinfuserows[index].fuserowtermstart; - palce16v8pinfuserows[index].fuserowtermend = pinfuserows[index].fuserowtermend; + for (index = 0; index < ARRAY_LEN(pinfuserows); ++index) + { + if (pinfuserows[index].pin == pin) + { + palce16v8pinfuserows[index].fuserowoutputenable = pinfuserows[index].fuserowoutputenable; + palce16v8pinfuserows[index].fuserowtermstart = pinfuserows[index].fuserowtermstart; + palce16v8pinfuserows[index].fuserowtermend = pinfuserows[index].fuserowtermend; - break; - } - } + break; + } + } } @@ -3010,28 +3010,28 @@ static void config_palce16v8_pin_as_7_product_terms_and_oe_term(UINT16 pin) static void config_palce16v8_pin_as_8_product_terms(UINT16 pin) { - static pin_fuse_rows pinfuserows[] = { - {12, NO_OUTPUT_ENABLE_FUSE_ROW, 1792, 2016}, - {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760}, - {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, - {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, - {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, - {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, - {18, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480}, - {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}}; - UINT16 index; + static pin_fuse_rows pinfuserows[] = { + {12, NO_OUTPUT_ENABLE_FUSE_ROW, 1792, 2016}, + {13, NO_OUTPUT_ENABLE_FUSE_ROW, 1536, 1760}, + {14, NO_OUTPUT_ENABLE_FUSE_ROW, 1280, 1504}, + {15, NO_OUTPUT_ENABLE_FUSE_ROW, 1024, 1248}, + {16, NO_OUTPUT_ENABLE_FUSE_ROW, 768, 992}, + {17, NO_OUTPUT_ENABLE_FUSE_ROW, 512, 736}, + {18, NO_OUTPUT_ENABLE_FUSE_ROW, 256, 480}, + {19, NO_OUTPUT_ENABLE_FUSE_ROW, 0, 224}}; + UINT16 index; - for (index = 0; index < ARRAY_LEN(pinfuserows); ++index) - { - if (pinfuserows[index].pin == pin) - { - palce16v8pinfuserows[index].fuserowoutputenable = pinfuserows[index].fuserowoutputenable; - palce16v8pinfuserows[index].fuserowtermstart = pinfuserows[index].fuserowtermstart; - palce16v8pinfuserows[index].fuserowtermend = pinfuserows[index].fuserowtermend; + for (index = 0; index < ARRAY_LEN(pinfuserows); ++index) + { + if (pinfuserows[index].pin == pin) + { + palce16v8pinfuserows[index].fuserowoutputenable = pinfuserows[index].fuserowoutputenable; + palce16v8pinfuserows[index].fuserowtermstart = pinfuserows[index].fuserowtermstart; + palce16v8pinfuserows[index].fuserowtermend = pinfuserows[index].fuserowtermend; - break; - } - } + break; + } + } } @@ -3061,20 +3061,20 @@ static void print_pal20xxx_product_terms(const pal_data* pal, const jed_data* je indent = 0; - if (flags & OUTPUT_COMBINATORIAL) - { - sprintf(buffer, LOW_SYMBOL OUTPUT_SYMBOL "%d " COMBINATORIAL_ASSIGNMENT " ", outputpins[index].pin); + if (flags & OUTPUT_COMBINATORIAL) + { + sprintf(buffer, LOW_SYMBOL OUTPUT_SYMBOL "%d " COMBINATORIAL_ASSIGNMENT " ", outputpins[index].pin); - printf("%s", buffer); + printf("%s", buffer); - haveterms = 0; - indent += strlen(buffer); + haveterms = 0; + indent += strlen(buffer); - fuse_rows = find_fuse_rows(pal, outputpins[index].pin); + fuse_rows = find_fuse_rows(pal, outputpins[index].pin); - for (row = fuse_rows->fuserowtermstart; row <= fuse_rows->fuserowtermend; - row += columncount) - { + for (row = fuse_rows->fuserowtermstart; row <= fuse_rows->fuserowtermend; + row += columncount) + { generate_product_terms(pal, jed, row, buffer); if (strlen(buffer) > 0) @@ -3082,8 +3082,8 @@ static void print_pal20xxx_product_terms(const pal_data* pal, const jed_data* je if (haveterms) { printf(" "); - printf(OR_SYMBOL); - printf("\n"); + printf(OR_SYMBOL); + printf("\n"); for (indentindex = 0; indentindex < indent; ++indentindex) { @@ -3097,69 +3097,69 @@ static void print_pal20xxx_product_terms(const pal_data* pal, const jed_data* je printf("%s", buffer); } - } + } - printf("\n"); + printf("\n"); - /* output enable equation */ + /* output enable equation */ - printf(OUTPUT_SYMBOL "%d.oe " COMBINATORIAL_ASSIGNMENT " ", outputpins[index].pin); + printf(OUTPUT_SYMBOL "%d.oe " COMBINATORIAL_ASSIGNMENT " ", outputpins[index].pin); - if (all_fuses_in_row_blown(pal, jed, fuse_rows->fuserowoutputenable)) - { - printf("vcc\n"); - } - else - { - generate_product_terms(pal, jed, fuse_rows->fuserowoutputenable, buffer); + if (all_fuses_in_row_blown(pal, jed, fuse_rows->fuserowoutputenable)) + { + printf("vcc\n"); + } + else + { + generate_product_terms(pal, jed, fuse_rows->fuserowoutputenable, buffer); - printf("%s\n", buffer); - } - } - else if (flags & OUTPUT_REGISTERED) - { - sprintf(buffer, LOW_SYMBOL REGISTERED_FEEDBACK_SYMBOL "%d " REGISTERED_ASSIGNMENT " ", outputpins[index].pin); + printf("%s\n", buffer); + } + } + else if (flags & OUTPUT_REGISTERED) + { + sprintf(buffer, LOW_SYMBOL REGISTERED_FEEDBACK_SYMBOL "%d " REGISTERED_ASSIGNMENT " ", outputpins[index].pin); - printf("%s", buffer); + printf("%s", buffer); - haveterms = 0; - indent += strlen(buffer); + haveterms = 0; + indent += strlen(buffer); - fuse_rows = find_fuse_rows(pal, outputpins[index].pin); - tmpindex = 0; + fuse_rows = find_fuse_rows(pal, outputpins[index].pin); + tmpindex = 0; - memset(rowhasterms, 0, sizeof(rowhasterms)); + memset(rowhasterms, 0, sizeof(rowhasterms)); - for (row = fuse_rows->fuserowtermstart; row <= fuse_rows->fuserowtermend; - row += columncount) - { + for (row = fuse_rows->fuserowtermstart; row <= fuse_rows->fuserowtermend; + row += columncount) + { generate_product_terms(pal, jed, row, buffer); if (strlen(buffer) > 0) - { - rowhasterms[tmpindex] = 1; + { + rowhasterms[tmpindex] = 1; if (haveterms) { - if (tmpindex == 1) - { - printf(" " OR_SYMBOL "\n"); - } - else if (tmpindex == 2) - { - printf(" " XOR_SYMBOL "\n"); - } - else if (tmpindex == 3) - { - if (rowhasterms[2]) - { - printf(" " OR_SYMBOL "\n"); - } - else - { - printf(" " XOR_SYMBOL "\n"); - } - } + if (tmpindex == 1) + { + printf(" " OR_SYMBOL "\n"); + } + else if (tmpindex == 2) + { + printf(" " XOR_SYMBOL "\n"); + } + else if (tmpindex == 3) + { + if (rowhasterms[2]) + { + printf(" " OR_SYMBOL "\n"); + } + else + { + printf(" " XOR_SYMBOL "\n"); + } + } for (indentindex = 0; indentindex < indent; ++indentindex) { @@ -3172,23 +3172,23 @@ static void print_pal20xxx_product_terms(const pal_data* pal, const jed_data* je } printf("%s", buffer); - } + } - ++tmpindex; - } + ++tmpindex; + } - printf("\n"); + printf("\n"); - /* output enable equation */ + /* output enable equation */ - printf(REGISTERED_FEEDBACK_SYMBOL "%d.oe " COMBINATORIAL_ASSIGNMENT " OE\n", outputpins[index].pin); - } - else - { - fprintf(stderr, "Unknown output type for pin %d!\n", outputpins[index].pin); - } + printf(REGISTERED_FEEDBACK_SYMBOL "%d.oe " COMBINATORIAL_ASSIGNMENT " OE\n", outputpins[index].pin); + } + else + { + fprintf(stderr, "Unknown output type for pin %d!\n", outputpins[index].pin); + } - printf("\n"); + printf("\n"); } } @@ -3706,7 +3706,7 @@ static void print_ck2605_product_terms(const pal_data* pal, const jed_data* jed) { if (haveterms) { - printf(" " OR_SYMBOL "\n"); + printf(" " OR_SYMBOL "\n"); for (indentindex = 0; indentindex < indent; ++indentindex) { @@ -3761,24 +3761,24 @@ static void print_epl10p8_product_terms(const pal_data* pal, const jed_data* jed { UINT16 pin; UINT16 or_fuse; /* 0 - intact? */ - UINT16 xor_fuse; /* 0 - intact? */ + UINT16 xor_fuse; /* 0 - intact? */ }; - static memory_cell memory_cells[] = { - {12, 661, 662}, - {13, 658, 659}, - {14, 655, 656}, - {15, 652, 653}, - {16, 649, 650}, - {17, 646, 647}, - {18, 643, 644}, - {19, 640, 641}}; + static memory_cell memory_cells[] = { + {12, 661, 662}, + {13, 658, 659}, + {14, 655, 656}, + {15, 652, 653}, + {16, 649, 650}, + {17, 646, 647}, + {18, 643, 644}, + {19, 640, 641}}; UINT16 index, columncount, flags, haveterms, fuserow; char buffer[200]; int indent, row, indentindex; const pin_fuse_rows* fuse_rows; - printf("Warning: This is experimental support!\n"); + printf("Warning: This is experimental support!\n"); columncount = calc_fuse_column_count(pal); @@ -3786,9 +3786,9 @@ static void print_epl10p8_product_terms(const pal_data* pal, const jed_data* jed print_output_pins(); printf("Equations:\n\n"); - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { flags = outputpins[index].flags; indent = 0; @@ -3810,21 +3810,21 @@ static void print_epl10p8_product_terms(const pal_data* pal, const jed_data* jed fuse_rows = find_fuse_rows(pal, outputpins[index].pin); if (!jed_get_fuse(jed, memory_cells[index].or_fuse) || - !jed_get_fuse(jed, memory_cells[index].xor_fuse)) - { - /* MMI PAL pin compatible configuration */ + !jed_get_fuse(jed, memory_cells[index].xor_fuse)) + { + /* MMI PAL pin compatible configuration */ - fuserow = fuse_rows->fuserowtermstart; + fuserow = fuse_rows->fuserowtermstart; - for (row = 0; row < 2; ++row) - { + for (row = 0; row < 2; ++row) + { generate_product_terms(pal, jed, fuserow, buffer); if (strlen(buffer) > 0) { if (haveterms) { - printf(" " OR_SYMBOL "\n"); + printf(" " OR_SYMBOL "\n"); for (indentindex = 0; indentindex < indent; ++indentindex) { @@ -3839,31 +3839,31 @@ static void print_epl10p8_product_terms(const pal_data* pal, const jed_data* jed printf("%s", buffer); } - fuserow += columncount; - } + fuserow += columncount; + } - printf("\n"); + printf("\n"); - printf(OUTPUT_SYMBOL "%d.oe " COMBINATORIAL_ASSIGNMENT " vcc\n", outputpins[index].pin); + printf(OUTPUT_SYMBOL "%d.oe " COMBINATORIAL_ASSIGNMENT " vcc\n", outputpins[index].pin); - printf("\n"); - } + printf("\n"); + } else if (!jed_get_fuse(jed, memory_cells[index].or_fuse) || - jed_get_fuse(jed, memory_cells[index].xor_fuse)) - { - /* or configuration */ + jed_get_fuse(jed, memory_cells[index].xor_fuse)) + { + /* or configuration */ - fuserow = fuse_rows->fuserowtermstart; + fuserow = fuse_rows->fuserowtermstart; - for (row = 0; row < 4; ++row) - { + for (row = 0; row < 4; ++row) + { generate_product_terms(pal, jed, fuserow, buffer); if (strlen(buffer) > 0) { if (haveterms) { - printf(" " OR_SYMBOL "\n"); + printf(" " OR_SYMBOL "\n"); for (indentindex = 0; indentindex < indent; ++indentindex) { @@ -3878,27 +3878,27 @@ static void print_epl10p8_product_terms(const pal_data* pal, const jed_data* jed printf("%s", buffer); } - fuse_rows += columncount; - } + fuse_rows += columncount; + } - printf("\n"); + printf("\n"); - printf(OUTPUT_SYMBOL "%d.oe " COMBINATORIAL_ASSIGNMENT " vcc\n", outputpins[index].pin); + printf(OUTPUT_SYMBOL "%d.oe " COMBINATORIAL_ASSIGNMENT " vcc\n", outputpins[index].pin); - printf("\n"); - } + printf("\n"); + } else if (jed_get_fuse(jed, memory_cells[index].or_fuse) || - !jed_get_fuse(jed, memory_cells[index].xor_fuse)) - { - /* xor configuration */ - } - else - { - fprintf(stderr, "Unknown fuse configuration for pin %d!", memory_cells[index].pin); - } - } + !jed_get_fuse(jed, memory_cells[index].xor_fuse)) + { + /* xor configuration */ + } + else + { + fprintf(stderr, "Unknown fuse configuration for pin %d!", memory_cells[index].pin); + } + } - printf("Warning: This is experimental support!\n"); + printf("Warning: This is experimental support!\n"); } @@ -3910,7 +3910,7 @@ static void print_epl10p8_product_terms(const pal_data* pal, const jed_data* jed static void print_epl12p6_product_terms(const pal_data* pal, const jed_data* jed) { - fprintf(stderr, "Printing product terms not supported for this device!\n"); + fprintf(stderr, "Printing product terms not supported for this device!\n"); } @@ -3922,7 +3922,7 @@ static void print_epl12p6_product_terms(const pal_data* pal, const jed_data* jed static void print_epl14p4_product_terms(const pal_data* pal, const jed_data* jed) { - fprintf(stderr, "Printing product terms not supported for this device!\n"); + fprintf(stderr, "Printing product terms not supported for this device!\n"); } @@ -3934,7 +3934,7 @@ static void print_epl14p4_product_terms(const pal_data* pal, const jed_data* jed static void print_epl16p2_product_terms(const pal_data* pal, const jed_data* jed) { - fprintf(stderr, "Printing product terms not supported for this device!\n"); + fprintf(stderr, "Printing product terms not supported for this device!\n"); } @@ -3946,7 +3946,7 @@ static void print_epl16p2_product_terms(const pal_data* pal, const jed_data* jed static void print_epl16p8_product_terms(const pal_data* pal, const jed_data* jed) { - fprintf(stderr, "Printing product terms not supported for this device!\n"); + fprintf(stderr, "Printing product terms not supported for this device!\n"); } @@ -3958,7 +3958,7 @@ static void print_epl16p8_product_terms(const pal_data* pal, const jed_data* jed static void print_epl16rp8_product_terms(const pal_data* pal, const jed_data* jed) { - fprintf(stderr, "Printing product terms not supported for this device!\n"); + fprintf(stderr, "Printing product terms not supported for this device!\n"); } @@ -3970,7 +3970,7 @@ static void print_epl16rp8_product_terms(const pal_data* pal, const jed_data* je static void print_epl16rp6_product_terms(const pal_data* pal, const jed_data* jed) { - fprintf(stderr, "Printing product terms not supported for this device!\n"); + fprintf(stderr, "Printing product terms not supported for this device!\n"); } @@ -3982,7 +3982,7 @@ static void print_epl16rp6_product_terms(const pal_data* pal, const jed_data* je static void print_epl16rp4_product_terms(const pal_data* pal, const jed_data* jed) { - fprintf(stderr, "Printing product terms not supported for this device!\n"); + fprintf(stderr, "Printing product terms not supported for this device!\n"); } #endif @@ -4091,7 +4091,7 @@ static void print_pal16rp8_product_terms(const pal_data* pal, const jed_data* je static void print_pal6l16_product_terms(const pal_data* pal, const jed_data* jed) { - print_product_terms(pal, jed); + print_product_terms(pal, jed); } @@ -4585,7 +4585,7 @@ static void config_palce16v8_pins(const pal_data* pal, const jed_data* jed) UINT16 pin; UINT16 sl0_fuse; /* registers allowed (0 - registered, 1 - not registered) */ UINT16 sl1_fuse; /* output polarity (0 - low, 1 - high) */ - UINT16 fuserowoutputenable; + UINT16 fuserowoutputenable; }; static output_logic_macrocell macrocells[] = { @@ -4598,242 +4598,242 @@ static void config_palce16v8_pins(const pal_data* pal, const jed_data* jed) {18, 2121, 2049, 256}, {19, 2120, 2048, 0}}; static pin_fuse_columns pinfusecolumns_i_or_o[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 17, 16}, - {7, 21, 20}, - {8, 25, 24}, - {9, 29, 28}, - {11, 31, 30}, - {12, 27, 26}, - {13, 23, 22}, - {14, 19, 18}, - {17, 15, 14}, - {18, 11, 10}, - {19, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 17, 16}, + {7, 21, 20}, + {8, 25, 24}, + {9, 29, 28}, + {11, 31, 30}, + {12, 27, 26}, + {13, 23, 22}, + {14, 19, 18}, + {17, 15, 14}, + {18, 11, 10}, + {19, 7, 6}}; static pin_fuse_columns pinfusecolumns_io[] = { - {1, 3, 2}, - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 17, 16}, - {7, 21, 20}, - {8, 25, 24}, - {9, 29, 28}, - {11, 31, 30}, - {13, 27, 26}, - {14, 23, 22}, - {15, 19, 18}, - {16, 15, 14}, - {17, 11, 10}, - {18, 7, 6}}; + {1, 3, 2}, + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 17, 16}, + {7, 21, 20}, + {8, 25, 24}, + {9, 29, 28}, + {11, 31, 30}, + {13, 27, 26}, + {14, 23, 22}, + {15, 19, 18}, + {16, 15, 14}, + {17, 11, 10}, + {18, 7, 6}}; static pin_fuse_columns pinfusecolumns_regs[] = { - {2, 1, 0}, - {3, 5, 4}, - {4, 9, 8}, - {5, 13, 12}, - {6, 17, 16}, - {7, 21, 20}, - {8, 25, 24}, - {9, 29, 28}, - {12, 31, 30}, - {13, 27, 26}, - {14, 23, 22}, - {15, 19, 18}, - {16, 15, 14}, - {17, 11, 10}, - {18, 7, 6}, - {19, 3, 2}}; - static UINT16 input_pins_i_or_o[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; - static UINT16 input_pins_io[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; - static UINT16 input_pins_regs[] = {2, 3, 4, 5, 6, 7, 8, 9}; - static UINT16 sg0 = 2192; - static UINT16 sg1 = 2193; - UINT16 input_pins[18]; - pin_output_config output_pins[ARRAY_LEN(macrocells)]; - UINT16 index, input_pin_count, output_pin_count; + {2, 1, 0}, + {3, 5, 4}, + {4, 9, 8}, + {5, 13, 12}, + {6, 17, 16}, + {7, 21, 20}, + {8, 25, 24}, + {9, 29, 28}, + {12, 31, 30}, + {13, 27, 26}, + {14, 23, 22}, + {15, 19, 18}, + {16, 15, 14}, + {17, 11, 10}, + {18, 7, 6}, + {19, 3, 2}}; + static UINT16 input_pins_i_or_o[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; + static UINT16 input_pins_io[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; + static UINT16 input_pins_regs[] = {2, 3, 4, 5, 6, 7, 8, 9}; + static UINT16 sg0 = 2192; + static UINT16 sg1 = 2193; + UINT16 input_pins[18]; + pin_output_config output_pins[ARRAY_LEN(macrocells)]; + UINT16 index, input_pin_count, output_pin_count; - input_pin_count = 0; + input_pin_count = 0; output_pin_count = 0; - if (!jed_get_fuse(jed, sg0)) - { - /* Device uses registers */ + if (!jed_get_fuse(jed, sg0)) + { + /* Device uses registers */ - if (jed_get_fuse(jed, sg1)) - { - memcpy(palce16v8pinfusecolumns, pinfusecolumns_regs, sizeof(pinfusecolumns_regs)); + if (jed_get_fuse(jed, sg1)) + { + memcpy(palce16v8pinfusecolumns, pinfusecolumns_regs, sizeof(pinfusecolumns_regs)); - memcpy(input_pins, input_pins_regs, sizeof(input_pins_regs)); + memcpy(input_pins, input_pins_regs, sizeof(input_pins_regs)); - input_pin_count = ARRAY_LEN(input_pins_regs); + input_pin_count = ARRAY_LEN(input_pins_regs); - for (index = 0; index < ARRAY_LEN(macrocells); ++index) - { - if (!jed_get_fuse(jed, macrocells[index].sl0_fuse)) - { - /* Registered output */ + for (index = 0; index < ARRAY_LEN(macrocells); ++index) + { + if (!jed_get_fuse(jed, macrocells[index].sl0_fuse)) + { + /* Registered output */ - config_palce16v8_pin_as_8_product_terms(macrocells[index].pin); + config_palce16v8_pin_as_8_product_terms(macrocells[index].pin); - output_pins[output_pin_count].pin = macrocells[index].pin; - output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; + output_pins[output_pin_count].pin = macrocells[index].pin; + output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; - if (!jed_get_fuse(jed, macrocells[index].sl1_fuse)) - { - output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; - } - else - { - output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; - } + if (!jed_get_fuse(jed, macrocells[index].sl1_fuse)) + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; + } + else + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; + } - ++output_pin_count; + ++output_pin_count; - input_pins[input_pin_count] = macrocells[index].pin; + input_pins[input_pin_count] = macrocells[index].pin; - ++input_pin_count; - } - else - { - /* Combinatorial I/O */ + ++input_pin_count; + } + else + { + /* Combinatorial I/O */ - if (does_output_enable_fuse_row_allow_output(pal, jed, macrocells[index].fuserowoutputenable)) - { - config_palce16v8_pin_as_7_product_terms_and_oe_term(macrocells[index].pin); + if (does_output_enable_fuse_row_allow_output(pal, jed, macrocells[index].fuserowoutputenable)) + { + config_palce16v8_pin_as_7_product_terms_and_oe_term(macrocells[index].pin); - output_pins[output_pin_count].pin = macrocells[index].pin; - output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; + output_pins[output_pin_count].pin = macrocells[index].pin; + output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; - if (!jed_get_fuse(jed, macrocells[index].sl1_fuse)) - { - output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; - } - else - { - output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; - } + if (!jed_get_fuse(jed, macrocells[index].sl1_fuse)) + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; + } + else + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; + } - ++output_pin_count; - } + ++output_pin_count; + } - input_pins[input_pin_count] = macrocells[index].pin; + input_pins[input_pin_count] = macrocells[index].pin; - ++input_pin_count; - } - } - } - else - { - fprintf(stderr, "Unknown configuration type!\n"); - } - } - else - { - /* Device uses no registers */ + ++input_pin_count; + } + } + } + else + { + fprintf(stderr, "Unknown configuration type!\n"); + } + } + else + { + /* Device uses no registers */ - if (jed_get_fuse(jed, sg1)) - { - /* Combinatorial I/O (7 product terms and 1 output enable product term) */ + if (jed_get_fuse(jed, sg1)) + { + /* Combinatorial I/O (7 product terms and 1 output enable product term) */ - memcpy(palce16v8pinfusecolumns, pinfusecolumns_io, sizeof(pinfusecolumns_io)); + memcpy(palce16v8pinfusecolumns, pinfusecolumns_io, sizeof(pinfusecolumns_io)); - memcpy(input_pins, input_pins_io, sizeof(input_pins_io)); + memcpy(input_pins, input_pins_io, sizeof(input_pins_io)); - input_pin_count = ARRAY_LEN(input_pins_io); + input_pin_count = ARRAY_LEN(input_pins_io); - for (index = 0; index < ARRAY_LEN(macrocells); ++index) - { - if (does_output_enable_fuse_row_allow_output(pal, jed, macrocells[index].fuserowoutputenable)) - { - config_palce16v8_pin_as_7_product_terms_and_oe_term(macrocells[index].pin); + for (index = 0; index < ARRAY_LEN(macrocells); ++index) + { + if (does_output_enable_fuse_row_allow_output(pal, jed, macrocells[index].fuserowoutputenable)) + { + config_palce16v8_pin_as_7_product_terms_and_oe_term(macrocells[index].pin); - output_pins[output_pin_count].pin = macrocells[index].pin; - output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; + output_pins[output_pin_count].pin = macrocells[index].pin; + output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; - if (!jed_get_fuse(jed, macrocells[index].sl1_fuse)) - { - output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; - } - else - { - output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; - } + if (!jed_get_fuse(jed, macrocells[index].sl1_fuse)) + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; + } + else + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; + } - ++output_pin_count; - } + ++output_pin_count; + } - /* Pins 12 and 19 cannot be used as an input only an output. */ + /* Pins 12 and 19 cannot be used as an input only an output. */ - if (macrocells[index].pin != 12 && macrocells[index].pin != 19) - { - input_pins[input_pin_count] = macrocells[index].pin; + if (macrocells[index].pin != 12 && macrocells[index].pin != 19) + { + input_pins[input_pin_count] = macrocells[index].pin; - ++input_pin_count; - } - } - } - else - { - /* Combinatorial Output or Input */ + ++input_pin_count; + } + } + } + else + { + /* Combinatorial Output or Input */ - memcpy(palce16v8pinfusecolumns, pinfusecolumns_i_or_o, sizeof(pinfusecolumns_i_or_o)); + memcpy(palce16v8pinfusecolumns, pinfusecolumns_i_or_o, sizeof(pinfusecolumns_i_or_o)); - memcpy(input_pins, input_pins_i_or_o, sizeof(input_pins_i_or_o)); + memcpy(input_pins, input_pins_i_or_o, sizeof(input_pins_i_or_o)); - input_pin_count = ARRAY_LEN(input_pins_i_or_o); + input_pin_count = ARRAY_LEN(input_pins_i_or_o); - for (index = 0; index < ARRAY_LEN(macrocells); ++index) - { - if (!jed_get_fuse(jed, macrocells[index].sl0_fuse)) - { - /* pin configured as an output only */ + for (index = 0; index < ARRAY_LEN(macrocells); ++index) + { + if (!jed_get_fuse(jed, macrocells[index].sl0_fuse)) + { + /* pin configured as an output only */ - config_palce16v8_pin_as_8_product_terms(macrocells[index].pin); + config_palce16v8_pin_as_8_product_terms(macrocells[index].pin); - output_pins[output_pin_count].pin = macrocells[index].pin; - output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; + output_pins[output_pin_count].pin = macrocells[index].pin; + output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; - if (!jed_get_fuse(jed, macrocells[index].sl1_fuse)) - { - output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; - } - else - { - output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; - } + if (!jed_get_fuse(jed, macrocells[index].sl1_fuse)) + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; + } + else + { + output_pins[output_pin_count].flags |= OUTPUT_ACTIVEHIGH; + } - ++output_pin_count; - } - else - { - /* pin configured as an input only */ + ++output_pin_count; + } + else + { + /* pin configured as an input only */ - input_pins[input_pin_count] = macrocells[index].pin; + input_pins[input_pin_count] = macrocells[index].pin; - ++input_pin_count; - } - } - } - } + ++input_pin_count; + } + } + } + } - set_input_pins(input_pins, input_pin_count); + set_input_pins(input_pins, input_pin_count); set_output_pins(output_pins, output_pin_count); - /* 2056 - 2119 are the 64 bit signature fuses */ + /* 2056 - 2119 are the 64 bit signature fuses */ - /* 2128 - 2135 product term 8? */ - /* 2136 - 2143 product term 7? */ - /* 2144 - 2151 product term 6? */ - /* 2152 - 2159 product term 5? */ - /* 2160 - 2167 product term 4? */ - /* 2168 - 2175 product term 3? */ - /* 2176 - 2183 product term 2? */ - /* 2184 - 2191 product term 1? */ + /* 2128 - 2135 product term 8? */ + /* 2136 - 2143 product term 7? */ + /* 2144 - 2151 product term 6? */ + /* 2152 - 2159 product term 5? */ + /* 2160 - 2167 product term 4? */ + /* 2168 - 2175 product term 3? */ + /* 2176 - 2183 product term 2? */ + /* 2184 - 2191 product term 1? */ } @@ -5698,21 +5698,21 @@ static void config_epl10p8_pins(const pal_data* pal, const jed_data* jed) UINT16 polarity_fuse; /* 0 - active low?, 1 - active high? */ }; - static memory_cell memory_cells[] = { - {12, 663}, - {13, 660}, - {14, 657}, - {15, 654}, - {16, 651}, - {17, 648}, - {18, 645}, - {19, 642}}; + static memory_cell memory_cells[] = { + {12, 663}, + {13, 660}, + {14, 657}, + {15, 654}, + {16, 651}, + {17, 648}, + {18, 645}, + {19, 642}}; static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; pin_output_config output_pins[8]; UINT16 index; - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { output_pins[index].pin = memory_cells[index].pin; output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; @@ -5724,7 +5724,7 @@ static void config_epl10p8_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -5745,22 +5745,22 @@ static void config_epl12p6_pins(const pal_data* pal, const jed_data* jed) UINT16 pin; UINT16 polarity_fuse; /* 0 - active low?, 1 - active high? */ UINT16 or_fuse; /* 0 - intact? */ - UINT16 xor_fuse; /* 0 - intact? */ + UINT16 xor_fuse; /* 0 - intact? */ }; - static memory_cell memory_cells[] = { - {13, 785, 783, 784}, - {14, 782, 780, 781}, - {15, 779, 777, 778}, - {16, 776, 774, 775}, - {17, 773, 771, 772}, - {18, 770, 768, 769}}; + static memory_cell memory_cells[] = { + {13, 785, 783, 784}, + {14, 782, 780, 781}, + {15, 779, 777, 778}, + {16, 776, 774, 775}, + {17, 773, 771, 772}, + {18, 770, 768, 769}}; static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 19}; pin_output_config output_pins[8]; UINT16 index; - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { output_pins[index].pin = memory_cells[index].pin; output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; @@ -5772,7 +5772,7 @@ static void config_epl12p6_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -5793,20 +5793,20 @@ static void config_epl14p4_pins(const pal_data* pal, const jed_data* jed) UINT16 pin; UINT16 polarity_fuse; /* 0 - active low?, 1 - active high? */ UINT16 or_fuse; /* 0 - intact? */ - UINT16 xor_fuse; /* 0 - intact? */ + UINT16 xor_fuse; /* 0 - intact? */ }; - static memory_cell memory_cells[] = { - {14, 907, 905, 906}, - {15, 904, 902, 903}, - {16, 901, 899, 900}, - {17, 898, 896, 897}}; + static memory_cell memory_cells[] = { + {14, 907, 905, 906}, + {15, 904, 902, 903}, + {16, 901, 899, 900}, + {17, 898, 896, 897}}; static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 18, 19}; pin_output_config output_pins[8]; UINT16 index; - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { output_pins[index].pin = memory_cells[index].pin; output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; @@ -5818,7 +5818,7 @@ static void config_epl14p4_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -5839,18 +5839,18 @@ static void config_epl16p2_pins(const pal_data* pal, const jed_data* jed) UINT16 pin; UINT16 polarity_fuse; /* 0 - active low?, 1 - active high? */ UINT16 or_fuse; /* 0 - intact? */ - UINT16 xor_fuse; /* 0 - intact? */ + UINT16 xor_fuse; /* 0 - intact? */ }; - static memory_cell memory_cells[] = { - {15, 1029, 1027, 1028}, - {16, 1026, 1024, 1025}}; + static memory_cell memory_cells[] = { + {15, 1029, 1027, 1028}, + {16, 1026, 1024, 1025}}; static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 17, 18, 19}; pin_output_config output_pins[8]; UINT16 index; - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { output_pins[index].pin = memory_cells[index].pin; output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; @@ -5862,7 +5862,7 @@ static void config_epl16p2_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -5883,24 +5883,24 @@ static void config_epl16p8_pins(const pal_data* pal, const jed_data* jed) UINT16 pin; UINT16 polarity_fuse; /* 0 - active low?, 1 - active high? */ UINT16 or_fuse; /* 0 - intact? */ - UINT16 xor_fuse; /* 0 - intact? */ + UINT16 xor_fuse; /* 0 - intact? */ }; - static memory_cell memory_cells[] = { - {12, 2071, 2069, 2070}, - {13, 2068, 2066, 2067}, - {14, 2065, 2063, 2064}, - {15, 2062, 2060, 2061}, - {16, 2059, 2057, 2058}, - {17, 2056, 2054, 2055}, - {18, 2053, 2051, 2052}, - {19, 2050, 2048, 2049}}; + static memory_cell memory_cells[] = { + {12, 2071, 2069, 2070}, + {13, 2068, 2066, 2067}, + {14, 2065, 2063, 2064}, + {15, 2062, 2060, 2061}, + {16, 2059, 2057, 2058}, + {17, 2056, 2054, 2055}, + {18, 2053, 2051, 2052}, + {19, 2050, 2048, 2049}}; static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; pin_output_config output_pins[8]; UINT16 index; - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { output_pins[index].pin = memory_cells[index].pin; output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; @@ -5912,7 +5912,7 @@ static void config_epl16p8_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -5933,26 +5933,26 @@ static void config_epl16rp8_pins(const pal_data* pal, const jed_data* jed) UINT16 pin; UINT16 polarity_fuse; /* 0 - active low?, 1 - active high? */ UINT16 or_fuse; /* 0 - intact? */ - UINT16 xor_fuse; /* 0 - intact? */ + UINT16 xor_fuse; /* 0 - intact? */ }; - static memory_cell memory_cells[] = { - {12, 2071, 2069, 2070}, - {13, 2068, 2066, 2067}, - {14, 2065, 2063, 2064}, - {15, 2062, 2060, 2061}, - {16, 2059, 2057, 2058}, - {17, 2056, 2054, 2055}, - {18, 2053, 2051, 2052}, - {19, 2050, 2048, 2049}}; + static memory_cell memory_cells[] = { + {12, 2071, 2069, 2070}, + {13, 2068, 2066, 2067}, + {14, 2065, 2063, 2064}, + {15, 2062, 2060, 2061}, + {16, 2059, 2057, 2058}, + {17, 2056, 2054, 2055}, + {18, 2053, 2051, 2052}, + {19, 2050, 2048, 2049}}; static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; pin_output_config output_pins[8]; UINT16 index; - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { output_pins[index].pin = memory_cells[index].pin; - output_pins[index].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; + output_pins[index].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; if (!jed_get_fuse(jed, memory_cells[index].polarity_fuse)) { @@ -5962,7 +5962,7 @@ static void config_epl16rp8_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -5983,36 +5983,36 @@ static void config_epl16rp6_pins(const pal_data* pal, const jed_data* jed) UINT16 pin; UINT16 polarity_fuse; /* 0 - active low?, 1 - active high? */ UINT16 or_fuse; /* 0 - intact? */ - UINT16 xor_fuse; /* 0 - intact? */ + UINT16 xor_fuse; /* 0 - intact? */ }; - static memory_cell memory_cells[] = { - {12, 2071, 2069, 2070}, - {13, 2068, 2066, 2067}, - {14, 2065, 2063, 2064}, - {15, 2062, 2060, 2061}, - {16, 2059, 2057, 2058}, - {17, 2056, 2054, 2055}, - {18, 2053, 2051, 2052}, - {19, 2050, 2048, 2049}}; + static memory_cell memory_cells[] = { + {12, 2071, 2069, 2070}, + {13, 2068, 2066, 2067}, + {14, 2065, 2063, 2064}, + {15, 2062, 2060, 2061}, + {16, 2059, 2057, 2058}, + {17, 2056, 2054, 2055}, + {18, 2053, 2051, 2052}, + {19, 2050, 2048, 2049}}; static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; pin_output_config output_pins[8]; UINT16 index; - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { output_pins[index].pin = memory_cells[index].pin; - if (memory_cells[index].pin == 13 || memory_cells[index].pin == 14 || - memory_cells[index].pin == 15 || memory_cells[index].pin == 16 || - memory_cells[index].pin == 17 || memory_cells[index].pin == 18) - { - output_pins[index].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; - } - else - { - output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; - } + if (memory_cells[index].pin == 13 || memory_cells[index].pin == 14 || + memory_cells[index].pin == 15 || memory_cells[index].pin == 16 || + memory_cells[index].pin == 17 || memory_cells[index].pin == 18) + { + output_pins[index].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; + } + else + { + output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; + } if (!jed_get_fuse(jed, memory_cells[index].polarity_fuse)) { @@ -6022,7 +6022,7 @@ static void config_epl16rp6_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -6043,35 +6043,35 @@ static void config_epl16rp4_pins(const pal_data* pal, const jed_data* jed) UINT16 pin; UINT16 polarity_fuse; /* 0 - active low?, 1 - active high? */ UINT16 or_fuse; /* 0 - intact? */ - UINT16 xor_fuse; /* 0 - intact? */ + UINT16 xor_fuse; /* 0 - intact? */ }; - static memory_cell memory_cells[] = { - {12, 2071, 2069, 2070}, - {13, 2068, 2066, 2067}, - {14, 2065, 2063, 2064}, - {15, 2062, 2060, 2061}, - {16, 2059, 2057, 2058}, - {17, 2056, 2054, 2055}, - {18, 2053, 2051, 2052}, - {19, 2050, 2048, 2049}}; + static memory_cell memory_cells[] = { + {12, 2071, 2069, 2070}, + {13, 2068, 2066, 2067}, + {14, 2065, 2063, 2064}, + {15, 2062, 2060, 2061}, + {16, 2059, 2057, 2058}, + {17, 2056, 2054, 2055}, + {18, 2053, 2051, 2052}, + {19, 2050, 2048, 2049}}; static UINT16 input_pins[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 11}; pin_output_config output_pins[8]; UINT16 index; - - for (index = 0; index < ARRAY_LEN(memory_cells); ++index) - { + + for (index = 0; index < ARRAY_LEN(memory_cells); ++index) + { output_pins[index].pin = memory_cells[index].pin; - if (memory_cells[index].pin == 14 || memory_cells[index].pin == 15 || - memory_cells[index].pin == 16 || memory_cells[index].pin == 17) - { - output_pins[index].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; - } - else - { - output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; - } + if (memory_cells[index].pin == 14 || memory_cells[index].pin == 15 || + memory_cells[index].pin == 16 || memory_cells[index].pin == 17) + { + output_pins[index].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; + } + else + { + output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; + } if (!jed_get_fuse(jed, memory_cells[index].polarity_fuse)) { @@ -6081,7 +6081,7 @@ static void config_epl16rp4_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -6101,10 +6101,10 @@ static void config_pal10p8_pins(const pal_data* pal, const jed_data* jed) pin_output_config output_pins[8]; UINT16 index; - for (index = 0; index < ARRAY_LEN(output_pins); ++index) - { + for (index = 0; index < ARRAY_LEN(output_pins); ++index) + { output_pins[index].pin = index + 12; - output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; + output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; if (!jed_get_fuse(jed, 327 - index)) { @@ -6114,7 +6114,7 @@ static void config_pal10p8_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -6133,10 +6133,10 @@ static void config_pal12p6_pins(const pal_data* pal, const jed_data* jed) pin_output_config output_pins[6]; UINT16 index; - for (index = 0; index < ARRAY_LEN(output_pins); ++index) - { + for (index = 0; index < ARRAY_LEN(output_pins); ++index) + { output_pins[index].pin = index + 13; - output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; + output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; if (!jed_get_fuse(jed, 389 - index)) { @@ -6146,7 +6146,7 @@ static void config_pal12p6_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -6165,10 +6165,10 @@ static void config_pal14p4_pins(const pal_data* pal, const jed_data* jed) pin_output_config output_pins[4]; UINT16 index; - for (index = 0; index < ARRAY_LEN(output_pins); ++index) - { + for (index = 0; index < ARRAY_LEN(output_pins); ++index) + { output_pins[index].pin = index + 14; - output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; + output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; if (!jed_get_fuse(jed, 451 - index)) { @@ -6178,7 +6178,7 @@ static void config_pal14p4_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -6197,10 +6197,10 @@ static void config_pal16p2_pins(const pal_data* pal, const jed_data* jed) pin_output_config output_pins[2]; UINT16 index; - for (index = 0; index < ARRAY_LEN(output_pins); ++index) - { + for (index = 0; index < ARRAY_LEN(output_pins); ++index) + { output_pins[index].pin = index + 15; - output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; + output_pins[index].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_NONE; if (!jed_get_fuse(jed, 513 - index)) { @@ -6210,7 +6210,7 @@ static void config_pal16p2_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -6310,7 +6310,7 @@ static void config_pal16rp4_pins(const pal_data* pal, const jed_data* jed) output_pins[output_pin_count].pin = registered_pins[index]; output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; - if (!jed_get_fuse(jed, 2053 - index)) + if (!jed_get_fuse(jed, 2053 - index)) { output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; } @@ -6398,7 +6398,7 @@ static void config_pal16rp6_pins(const pal_data* pal, const jed_data* jed) output_pins[output_pin_count].pin = registered_pins[index]; output_pins[output_pin_count].flags = OUTPUT_REGISTERED | OUTPUT_FEEDBACK_REGISTERED; - if (!jed_get_fuse(jed, 2054 - index)) + if (!jed_get_fuse(jed, 2054 - index)) { output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; } @@ -6415,7 +6415,7 @@ static void config_pal16rp6_pins(const pal_data* pal, const jed_data* jed) output_pins[output_pin_count].pin = 19; output_pins[output_pin_count].flags = OUTPUT_COMBINATORIAL | OUTPUT_FEEDBACK_OUTPUT; - if (!jed_get_fuse(jed, 2048)) + if (!jed_get_fuse(jed, 2048)) { output_pins[output_pin_count].flags |= OUTPUT_ACTIVELOW; } @@ -6454,7 +6454,7 @@ static void config_pal16rp8_pins(const pal_data* pal, const jed_data* jed) for (index = 0; index < ARRAY_LEN(output_pins); ++index) { - if (!jed_get_fuse(jed, 2055 - index)) + if (!jed_get_fuse(jed, 2055 - index)) { output_pins[index].flags |= OUTPUT_ACTIVELOW; } @@ -6462,7 +6462,7 @@ static void config_pal16rp8_pins(const pal_data* pal, const jed_data* jed) { output_pins[index].flags |= OUTPUT_ACTIVEHIGH; } - } + } set_input_pins(input_pins, ARRAY_LEN(input_pins)); set_output_pins(output_pins, ARRAY_LEN(output_pins)); @@ -7114,7 +7114,7 @@ static int command_convert(int argc, char *argv[]) static int command_view(int argc, char *argv[]) { - int result = 0; + int result = 0; const char *srcfile, *palname; int is_jed; const pal_data* pal; @@ -7145,8 +7145,8 @@ static int command_view(int argc, char *argv[]) err = read_source_file(srcfile); if (err != 0) { - result = 1; - goto end; + result = 1; + goto end; } /* if the source is JED, convert to binary */ @@ -7171,12 +7171,12 @@ static int command_view(int argc, char *argv[]) } } - if (jed.numfuses != pal->numfuses) - { + if (jed.numfuses != pal->numfuses) + { fprintf(stderr, "Fuse count does not match this pal type."); - result = 1; - goto end; - } + result = 1; + goto end; + } /* generate equations from fuse map */ diff --git a/src/tools/nltool.c b/src/tools/nltool.c index a9ba2b56b0..4ac904bb66 100644 --- a/src/tools/nltool.c +++ b/src/tools/nltool.c @@ -25,43 +25,43 @@ #if 0 void mame_printf_warning(const char *format, ...) { - va_list argptr; + va_list argptr; - /* do the output */ - va_start(argptr, format); - vprintf(format, argptr); - va_end(argptr); + /* do the output */ + va_start(argptr, format); + vprintf(format, argptr); + va_end(argptr); } #endif void *malloc_file_line(size_t size, const char *file, int line) { - // allocate the memory and fail if we can't - void *ret = osd_malloc(size); - memset(ret, 0, size); - return ret; + // allocate the memory and fail if we can't + void *ret = osd_malloc(size); + memset(ret, 0, size); + return ret; } void *malloc_array_file_line(size_t size, const char *file, int line) { - // allocate the memory and fail if we can't - void *ret = osd_malloc_array(size); - memset(ret, 0, size); - return ret; + // allocate the memory and fail if we can't + void *ret = osd_malloc_array(size); + memset(ret, 0, size); + return ret; } void free_file_line( void *memory, const char *file, int line ) { - osd_free( memory ); + osd_free( memory ); } struct options_entry oplist[] = { - { "time_to_run;ttr", "1.0", OPTION_FLOAT, "time to run the emulation (seconds)" }, - { "f", "-", OPTION_STRING, "file to process (default is stdin)" }, - { "help;h", "0", OPTION_BOOLEAN, "display help" }, - { NULL } + { "time_to_run;ttr", "1.0", OPTION_FLOAT, "time to run the emulation (seconds)" }, + { "f", "-", OPTION_STRING, "file to process (default is stdin)" }, + { "help;h", "0", OPTION_BOOLEAN, "display help" }, + { NULL } }; /*************************************************************************** @@ -70,90 +70,89 @@ struct options_entry oplist[] = const char *filetobuf(pstring fname) { - static pstring pbuf = ""; + static pstring pbuf = ""; - if (fname == "-") - { - char lbuf[1024]; - while (!feof(stdin)) - { - fgets(lbuf, 1024, stdin); - pbuf += lbuf; - } - printf("%d\n",*(pbuf.right(1).cstr()+1)); - return pbuf.cstr(); - } - else - { - FILE *f; - f = fopen(fname, "rb"); - fseek(f, 0, SEEK_END); - long fsize = ftell(f); - fseek(f, 0, SEEK_SET); + if (fname == "-") + { + char lbuf[1024]; + while (!feof(stdin)) + { + fgets(lbuf, 1024, stdin); + pbuf += lbuf; + } + printf("%d\n",*(pbuf.right(1).cstr()+1)); + return pbuf.cstr(); + } + else + { + FILE *f; + f = fopen(fname, "rb"); + fseek(f, 0, SEEK_END); + long fsize = ftell(f); + fseek(f, 0, SEEK_SET); - char *buf = (char *) malloc(fsize); - fread(buf, fsize, 1, f); - buf[fsize] = 0; - fclose(f); - return buf; - } + char *buf = (char *) malloc(fsize); + fread(buf, fsize, 1, f); + buf[fsize] = 0; + fclose(f); + return buf; + } } class netlist_tool_t : public netlist_base_t { public: - netlist_tool_t() - : netlist_base_t(), m_setup(NULL) - { + netlist_tool_t() + : netlist_base_t(), m_setup(NULL) + { + } - } + virtual ~netlist_tool_t() { }; - virtual ~netlist_tool_t() { }; + void read_netlist(const char *buffer) + { + m_setup = new netlist_setup_t(*this); + this->set_clock_freq(NETLIST_CLOCK); - void read_netlist(const char *buffer) - { - m_setup = new netlist_setup_t(*this); - this->set_clock_freq(NETLIST_CLOCK); + // register additional devices + //m_setup->factory().register_device( "NETDEV_CALLBACK", "nld_analog_callback"); - // register additional devices - //m_setup->factory().register_device( "NETDEV_CALLBACK", "nld_analog_callback"); + // read the netlist ... + //m_setup_func(*m_setup); - // read the netlist ... - //m_setup_func(*m_setup); + m_setup->parse(buffer); - m_setup->parse(buffer); - - // start devices - m_setup->start_devices(); - m_setup->resolve_inputs(); - // reset - this->reset(); - } + // start devices + m_setup->start_devices(); + m_setup->resolve_inputs(); + // reset + this->reset(); + } protected: - void vfatalerror(const char *format, va_list ap) const - { - vprintf(format, ap); - throw; - } + void vfatalerror(const char *format, va_list ap) const + { + vprintf(format, ap); + throw; + } private: - netlist_setup_t *m_setup; + netlist_setup_t *m_setup; }; void usage(core_options &opts) { - astring buffer; - fprintf(stderr, - "Usage:\n" - " nltool -help\n" - " nltool [options]\n" - "\n" - "Where:\n" - ); - fprintf(stderr, "%s\n", opts.output_help(buffer)); + astring buffer; + fprintf(stderr, + "Usage:\n" + " nltool -help\n" + " nltool [options]\n" + "\n" + "Where:\n" + ); + fprintf(stderr, "%s\n", opts.output_help(buffer)); } /*------------------------------------------------- @@ -166,37 +165,37 @@ int main(int argc, char *argv[]) netlist_tool_t nt; core_options opts(oplist); astring aerror(""); - osd_ticks_t t = osd_ticks(); + osd_ticks_t t = osd_ticks(); - fprintf(stderr, "%s", "WARNING: This is Work In Progress! - It may fail anytime\n"); + 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)) { - fprintf(stderr, "%s\n", aerror.cstr()); - usage(opts); - return 1; + fprintf(stderr, "%s\n", aerror.cstr()); + usage(opts); + return 1; } if (opts.bool_value("h")) { - usage(opts); - return 1; + usage(opts); + return 1; } - nt.read_netlist(filetobuf(opts.value("f"))); - double ttr = opts.float_value("ttr"); + nt.read_netlist(filetobuf(opts.value("f"))); + double ttr = opts.float_value("ttr"); - INT64 tt = ttr * NETLIST_CLOCK; + INT64 tt = ttr * NETLIST_CLOCK; - printf("startup time ==> %5.3f\n", (double) (osd_ticks() - t) / (double) osd_ticks_per_second() ); - printf("runnning ...\n"); - t = osd_ticks(); - while (tt>0) - { - INT32 tr = MIN(tt, NETLIST_CLOCK / 10); - tt -= tr; - nt.process_queue(tr); - } - double emutime = (double) (osd_ticks() - t) / (double) osd_ticks_per_second(); - printf("%f seconds emulation took %f real time ==> %5.2f%%\n", ttr, emutime, ttr/emutime*100.0); - - return 0; + printf("startup time ==> %5.3f\n", (double) (osd_ticks() - t) / (double) osd_ticks_per_second() ); + printf("runnning ...\n"); + t = osd_ticks(); + while (tt>0) + { + INT32 tr = MIN(tt, NETLIST_CLOCK / 10); + tt -= tr; + nt.process_queue(tr); + } + double emutime = (double) (osd_ticks() - t) / (double) osd_ticks_per_second(); + printf("%f seconds emulation took %f real time ==> %5.2f%%\n", ttr, emutime, ttr/emutime*100.0); + + return 0; } diff --git a/src/tools/romcmp.c b/src/tools/romcmp.c index d268a17310..735b22d48c 100644 --- a/src/tools/romcmp.c +++ b/src/tools/romcmp.c @@ -472,7 +472,7 @@ static int load_files(int i, int *found, const char *path) UINT64 size = d->size; while (size && (size & 1) == 0) size >>= 1; //if (size & ~1) - // printf("%-23s %-23s ignored (not a ROM)\n",i ? "" : d_name,i ? d_name : ""); + // printf("%-23s %-23s ignored (not a ROM)\n",i ? "" : d_name,i ? d_name : ""); //else { strcpy(files[i][found[i]].name,d_name); diff --git a/src/version.c b/src/version.c index 28b98b8f31..c93644ad1c 100644 --- a/src/version.c +++ b/src/version.c @@ -9,4 +9,4 @@ ***************************************************************************/ extern const char build_version[]; -const char build_version[] = "0.151 ("__DATE__")"; +const char build_version[] = "0.152 ("__DATE__")";