diff options
| author | 2019-12-21 15:15:32 +1100 | |
|---|---|---|
| committer | 2019-12-21 15:15:32 +1100 | |
| commit | 826db8a22b2d1f173af5a9be504bf9c3acd7f5c8 (patch) | |
| tree | d27419821aeea7d4422a8a2fe9b48aefe3838c9c | |
| parent | 320133cf13c02f8585315edb28319c0c24069a1e (diff) | |
srcclean (nw)
96 files changed, 1533 insertions, 1533 deletions
diff --git a/hash/gameboy.xml b/hash/gameboy.xml index 4e32bdf05f8..2a5a6501919 100644 --- a/hash/gameboy.xml +++ b/hash/gameboy.xml @@ -7854,7 +7854,7 @@ <feature name="pcb" value="DMG-A06-01" /> <feature name="u1" value="U1 2M/4M/8M-MROM" /> <feature name="u2" value="U2 MBC-5" /> - <feature name="u3" value="U3 64K-SRAM" /> + <feature name="u3" value="U3 64K-SRAM" /> <feature name="u4" value="U4 MM1134A" /> <feature name="batt" value="Batt CR1616" /> <feature name="slot" value="rom_mbc5" /> diff --git a/hash/gameking.xml b/hash/gameking.xml index 7c0e10d38c7..cba172356f1 100644 --- a/hash/gameking.xml +++ b/hash/gameking.xml @@ -43,24 +43,24 @@ S2: to VCC (most likely WE) S3: to GND (most likely OE) S1: is on some carts directly connected to VCC - there are multiple cartridge types with different dates stamped on the PCB - - 128KB capacity - - 2007 / APR 02 04 / REV:1.0 - 2007 / APR 28 04 / REV:2.0 - - 512KB capacity - - 2007B / OCT 28 04 / REV:1.0 - 2007D / APR 23 05 / REV:1.0 - - 1024KB capacity - 2007E / JUN 16 05 / REV:1.0 - - the dates are not the release dates for the individual games. - - all GameKing 3 cartridges seen have been the 2007D type + there are multiple cartridge types with different dates stamped on the PCB + + 128KB capacity + + 2007 / APR 02 04 / REV:1.0 + 2007 / APR 28 04 / REV:2.0 + + 512KB capacity + + 2007B / OCT 28 04 / REV:1.0 + 2007D / APR 23 05 / REV:1.0 + + 1024KB capacity + 2007E / JUN 16 05 / REV:1.0 + + the dates are not the release dates for the individual games. + + all GameKing 3 cartridges seen have been the 2007D type --> diff --git a/hash/gameking3.xml b/hash/gameking3.xml index 30ec1c308f8..a8ad8312a98 100644 --- a/hash/gameking3.xml +++ b/hash/gameking3.xml @@ -73,7 +73,7 @@ </dataarea> </part> </software> - + <software name="vagrant" supported="partial"> <description>Vagrant</description> <year>200?</year> @@ -83,6 +83,6 @@ <rom name="vagrant.gk3" size="524288" crc="db50e1c9" sha1="80f27ec7973d336e12ee506f090440db35ecf183"/> </dataarea> </part> - </software> + </software> </softwarelist> diff --git a/hash/ibm5170.xml b/hash/ibm5170.xml index efd3eef9430..d7aeb7f17c9 100644 --- a/hash/ibm5170.xml +++ b/hash/ibm5170.xml @@ -12291,7 +12291,7 @@ </dataarea> </part> </software> - + <software name="sleepwalker"> <description>Sleepwalker</description> <year>1993</year> @@ -12792,7 +12792,7 @@ </dataarea> </part> </software> - + <software name="ufoeuita" cloneof="ufoeu"> <description>UFO - Enemy Unknown (Italy)</description> <year>1994</year> diff --git a/hash/jaguar.xml b/hash/jaguar.xml index 9fd0c54aebb..f8dd1277fe3 100644 --- a/hash/jaguar.xml +++ b/hash/jaguar.xml @@ -868,7 +868,7 @@ Unreleased (possibly no prototypes exist): </dataarea> </part> </software> - + <!-- throws exception after few seconds on title screen --> <software name="tempst2k" supported="no"> <description>Tempest 2000</description> @@ -1028,7 +1028,7 @@ Unreleased (possibly no prototypes exist): </part> </software> - <!-- boot OK, sound buzz when selecting new game, can eventually black screen or throw an exception --> + <!-- boot OK, sound buzz when selecting new game, can eventually black screen or throw an exception --> <software name="wolfn3d" supported="no"> <description>Wolfenstein 3D</description> <year>1994</year> diff --git a/hash/samcoupe_flop.xml b/hash/samcoupe_flop.xml index 1a9bfb99393..addad3124d4 100644 --- a/hash/samcoupe_flop.xml +++ b/hash/samcoupe_flop.xml @@ -3,21 +3,21 @@ <!-- to boot disks type 'BOOT' and press return alternatively press numpad 9 which seems to do the same thing - + disk image formats: .mgt .dsk .sad confusingly there seems to be two types of .dsk image, one is just the same as .mgt in all but the extension, the other is "extended DSK disk image" (sometimes with .edsk extension) which is often used for Amstrad CPC and Spectrum +3 images. .sad seems to be a more advanced format that allows copy-protected images etc. - + currently only .mgt/.dsk is supported in coupedsk.cpp should be trivial to add "extended DSK disk image" support as it's already in Mame. - + most game images have trainers/pokes. all Sam Coupe games will probably need re-dumping at some point as there seems to be very few clean images available. TOSEC and GoodSamC don't have much, mostly hacked, demos, unlicensed/homebrew etc. www.worldofsam.org is a good source of infomation but most commercial games are not available for download. - + SAMDOS disks include the official MGT ZX Spectrum emulator. --> diff --git a/hash/spectrum_cass.xml b/hash/spectrum_cass.xml index 10c9d107ef3..47e68020af8 100644 --- a/hash/spectrum_cass.xml +++ b/hash/spectrum_cass.xml @@ -90118,7 +90118,7 @@ </dataarea> </part> </software> - + <software name="lospajar"> <description>Los Pajaros De Bangkok</description> <year>19??</year> diff --git a/hash/spectrum_mgt_flop.xml b/hash/spectrum_mgt_flop.xml index 70a04ebab83..d19fd3e0c24 100644 --- a/hash/spectrum_mgt_flop.xml +++ b/hash/spectrum_mgt_flop.xml @@ -15,8 +15,8 @@ for disciple, must use matching rom/system disk versions: v2 rom -> system disk/system tape ver 2, 2b, 2c v3 rom -> system disk/system tape ver 3a, 3b or 3d - - for plusd, must use matching rom/system disk versions: + + for plusd, must use matching rom/system disk versions: v1 rom -> system disk/system tape ver 1 v1a rom -> system disk/system tape ver 2a --> diff --git a/hash/vectrex.xml b/hash/vectrex.xml index be4d2948e3f..79d6d692d9b 100644 --- a/hash/vectrex.xml +++ b/hash/vectrex.xml @@ -22,7 +22,7 @@ Color Clash Color Clash Slim Continuum - The Infernal Tetramorph Continuum - The 7 Pillars of Purgatory -Continuum - Time Warp +Continuum - Time Warp Dead of Knight Debris Debris Revisited diff --git a/src/devices/bus/cbus/pc9801_86.cpp b/src/devices/bus/cbus/pc9801_86.cpp index e6672ff776c..ed7012900ee 100644 --- a/src/devices/bus/cbus/pc9801_86.cpp +++ b/src/devices/bus/cbus/pc9801_86.cpp @@ -57,7 +57,7 @@ void pc9801_86_device::pc9801_86_config(machine_config &config) // OPL4 YMF278 + YRW801 (U21 + U22) // TC55257CFL-10 (U15) // unknown chip (most likely surface scratched) U3) - + SPEAKER(config, "lspeaker").front_left(); SPEAKER(config, "rspeaker").front_right(); YM2608(config, m_opna, 7.987_MHz_XTAL); // actually YM2608B diff --git a/src/devices/bus/spectrum/mgt.cpp b/src/devices/bus/spectrum/mgt.cpp index 0b244b30034..142e3ef1997 100644 --- a/src/devices/bus/spectrum/mgt.cpp +++ b/src/devices/bus/spectrum/mgt.cpp @@ -103,16 +103,16 @@ v3 rom: use system disk/system tape ver 3a, 3b or 3d +D G+DOS versions: - The rom/system disk versions must match, + The rom/system disk versions must match, v1 rom: system disk/system tape ver 1 v1a rom: system disk/system tape ver 2a - - +D only curiosities: - The earliest v1.0 unit has a very crude pcb (no solder resist or silkscreen markings), - has various rework modifications (cut tracks, flying wires, piggy-backed chips etc.), - the PAL is a 16L6 rather than a 20L8 used in later version (only known dump is bruteforced and converted to gal20v8 target.) - details here: https://web.archive.org/web/20171118171054/http://trastero.speccy.org/cosas/JL/PlusD/PlusD-v1-0.html - + + +D only curiosities: + The earliest v1.0 unit has a very crude pcb (no solder resist or silkscreen markings), + has various rework modifications (cut tracks, flying wires, piggy-backed chips etc.), + the PAL is a 16L6 rather than a 20L8 used in later version (only known dump is bruteforced and converted to gal20v8 target.) + details here: https://web.archive.org/web/20171118171054/http://trastero.speccy.org/cosas/JL/PlusD/PlusD-v1-0.html + from "pick-poke-it" user manual (reguarding v1.0 unit): "A few PLUS D users are still using Version 1 of the ROM which was used in PLUS D's sold in December 1987-January 1988. ... check the serial number on the bottom of your PLUS D. If it's a 4-figure number commencing with 1, @@ -240,7 +240,7 @@ ROM_START(plusd) ROM_SYSTEM_BIOS(1, "unidos", "UNI-DOS v2") ROMX_LOAD("plusd_uni.rom", 0x0000, 0x2000, CRC(60920496) SHA1(399c8c7c8335bc59849a2182c32347603fd0288a), ROM_BIOS(1)) - + ROM_SYSTEM_BIOS(2, "gdos1", "G+DOS v1") ROMX_LOAD("plusd_g1.rom", 0x0000, 0x2000, CRC(e29c0d41) SHA1(fd7e4557d0080a3532200ce72211eb1b185d7d0a), ROM_BIOS(2)) diff --git a/src/devices/cpu/m68000/m68kmmu.h b/src/devices/cpu/m68000/m68kmmu.h index 3e55f51ec39..f9cdf880358 100644 --- a/src/devices/cpu/m68000/m68kmmu.h +++ b/src/devices/cpu/m68000/m68kmmu.h @@ -229,7 +229,7 @@ void pmmu_atc_flush_fc_ea(const u16 modes) { if ((e & M68K_MMU_ATC_VALID) && (((e >> 24) & fcmask) == fc) && -// (((e >> ps) << (ps - 8)) == ((ea >> ps) << (ps - 8)))) +// (((e >> ps) << (ps - 8)) == ((ea >> ps) << (ps - 8)))) ( (e << ps) == (ea >> 8 << ps) )) { MMULOG("flushing entry %08x\n", e); diff --git a/src/devices/cpu/unsp/unsp_extended.cpp b/src/devices/cpu/unsp/unsp_extended.cpp index 653a63c1c75..4d10495f31c 100644 --- a/src/devices/cpu/unsp/unsp_extended.cpp +++ b/src/devices/cpu/unsp/unsp_extended.cpp @@ -38,7 +38,7 @@ void unsp_20_device::execute_extended_group(uint16_t op) { // A += B //logerror( "(Extended group 0) %s += %s\n", (ra & 0x8) ? extregs[ra & 0x7] : regs[ra & 0x7] - // , (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); + // , (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); m_core->m_icount -= 1; // TODO uint16_t r0 = (ra & 0x8) ? m_secondary_r[ra & 0x7] : m_core->m_r[ra & 0x7]; @@ -90,7 +90,7 @@ void unsp_20_device::execute_extended_group(uint16_t op) { // CMP A,B //logerror( "(Extended group 0) cmp %s, %s\n", (ra & 0x8) ? extregs[ra & 0x7] : regs[ra & 0x7] - // , (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); + // , (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); m_core->m_icount -= 1; // TODO uint16_t r0 = (ra & 0x8) ? m_secondary_r[ra & 0x7] : m_core->m_r[ra & 0x7]; @@ -124,7 +124,7 @@ void unsp_20_device::execute_extended_group(uint16_t op) { // A = B //logerror("(Extended group 0) %s = %s\n", (ra & 0x8) ? extregs[ra & 0x7] : regs[ra & 0x7] - // , (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); + // , (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); m_core->m_icount -= 1; // TODO uint32_t lres = (rb & 0x8) ? m_secondary_r[rb & 0x7] : m_core->m_r[rb & 0x7]; @@ -220,7 +220,7 @@ void unsp_20_device::execute_extended_group(uint16_t op) logerror("(Ext) push <BAD>\n"); unimplemented_opcode(op, ximm); } - + return; } else @@ -235,7 +235,7 @@ void unsp_20_device::execute_extended_group(uint16_t op) if ((rx - (size - 1)) >= 0) { //logerror("(Ext) pop %s, %s from [%s]\n", - // extregs[rx - size], extregs[rx], (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); + // extregs[rx - size], extregs[rx], (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); int realrx = 7 - rx; while (size--) @@ -336,7 +336,7 @@ void unsp_20_device::execute_extended_group(uint16_t op) { // A = C //logerror("(Extended group 1) %s = %04x\n", (ra & 0x8) ? extregs[ra & 0x7] : regs[ra & 0x7] - // , imm16_2); + // , imm16_2); m_core->m_icount -= 1; // TODO uint32_t lres = imm16_2; @@ -473,7 +473,7 @@ void unsp_20_device::execute_extended_group(uint16_t op) { // A = C //logerror("(Extended group 2) %s = [%04x]\n", (ra & 0x8) ? extregs[ra & 0x7] : regs[ra & 0x7] - // , imm16_2); + // , imm16_2); //unimplemented_opcode(op, ximm, imm16_2); m_core->m_icount -= 1; // TODO @@ -656,7 +656,7 @@ void unsp_20_device::execute_extended_group(uint16_t op) { // C = B //logerror( "(Extended group 3) [%04x] = %s\n", imm16_2 - // , (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); + // , (rb & 0x8) ? extregs[rb & 0x7] : regs[rb & 0x7]); m_core->m_icount -= 1; // TODO if (ra != rb) @@ -1000,12 +1000,12 @@ void unsp_20_device::execute_extended_group(uint16_t op) { // CMP A,B //logerror("(Extended group 6) cmp %s, %02x\n", extregs[rx], imm6); - + m_core->m_icount -= 1; // TODO uint32_t lres = m_secondary_r[rx] + (uint16_t)(~imm6) + uint32_t(1); update_nzsc(lres, m_secondary_r[rx] , ~imm6); - + //unimplemented_opcode(op, ximm); return; break; @@ -1116,9 +1116,9 @@ void unsp_20_device::execute_extended_group(uint16_t op) uint16_t r1 = read16(addr); uint32_t lres = r0 + r1 + c; - + update_nzsc(lres, r0, r1); - + m_secondary_r[rx] = lres; //unimplemented_opcode(op, ximm); diff --git a/src/devices/cpu/unsp/unsp_exxx.cpp b/src/devices/cpu/unsp/unsp_exxx.cpp index 25f754bb2e8..d631e096588 100644 --- a/src/devices/cpu/unsp/unsp_exxx.cpp +++ b/src/devices/cpu/unsp/unsp_exxx.cpp @@ -181,9 +181,9 @@ void unsp_12_device::execute_exxx_group(uint16_t op) case 0x02: logerror("pc:%06x: %s = %s lsl %s (%04x %04x) : ", UNSP_LPC, regs[rd], regs[rd], regs[rs], m_core->m_r[rd], m_core->m_r[rs]); - + m_core->m_r[rd] = (uint16_t)((m_core->m_r[rd]&0xffff) << (m_core->m_r[rs] & 0x01f)); - + logerror("result %04x\n", m_core->m_r[rd]); return; @@ -197,8 +197,8 @@ void unsp_12_device::execute_exxx_group(uint16_t op) unimplemented_opcode(op); uint32_t res = (uint16_t)(m_core->m_r[rd]); - - res <<= (m_core->m_r[rs] & 0x01f); + + res <<= (m_core->m_r[rs] & 0x01f); m_core->m_r[rd] = (res & 0xffff); m_core->m_r[rd + 1] |= (res >> 16); // register bleeding? @@ -208,7 +208,7 @@ void unsp_12_device::execute_exxx_group(uint16_t op) } case 0x04: - // smartfp loops increasing shift by 4 up to values of 28? (but regs are 16-bit?) + // smartfp loops increasing shift by 4 up to values of 28? (but regs are 16-bit?) logerror("pc:%06x: %s = %s lsr %s (%04x %04x) : ", UNSP_LPC, regs[rd], regs[rd], regs[rs], m_core->m_r[rd], m_core->m_r[rs]); m_core->m_r[rd] = (uint16_t)((m_core->m_r[rd]&0xffff) >> (m_core->m_r[rs] & 0x1f)); logerror("result %04x\n", m_core->m_r[rd]); @@ -224,7 +224,7 @@ void unsp_12_device::execute_exxx_group(uint16_t op) uint32_t res = (uint16_t)(m_core->m_r[rd]); res <<= 16; - + res = res >> (m_core->m_r[rs] & 0x01f); // register bleeding behavior needed (for example) in jak_cars2 nand browser when increasing upper digits of address diff --git a/src/devices/cpu/unsp/unsp_fxxx.cpp b/src/devices/cpu/unsp/unsp_fxxx.cpp index 97cc652e649..3566ccaa066 100644 --- a/src/devices/cpu/unsp/unsp_fxxx.cpp +++ b/src/devices/cpu/unsp/unsp_fxxx.cpp @@ -45,14 +45,14 @@ inline void unsp_device::execute_fxxx_000_group(uint16_t op) { int r = op & 0x7; logerror("%s = fr\n", regs[r]); - // unimplemented_opcode(op); + // unimplemented_opcode(op); return; } else if (((op & 0xf1f8) == 0xf038) && m_iso >= 12) { int r = op & 0x7; logerror("fr = %s\n", regs[r]); - // unimplemented_opcode(op); + // unimplemented_opcode(op); return; } diff --git a/src/devices/machine/acorn_vidc.cpp b/src/devices/machine/acorn_vidc.cpp index 94ddfb8b3c8..54317b991e2 100644 --- a/src/devices/machine/acorn_vidc.cpp +++ b/src/devices/machine/acorn_vidc.cpp @@ -77,7 +77,7 @@ acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, device_t acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : acorn_vidc10_device(mconfig, ACORN_VIDC10, tag, owner, clock) { - m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, 0, address_map_constructor(FUNC(acorn_vidc10_device::regs_map), this)); + m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, 0, address_map_constructor(FUNC(acorn_vidc10_device::regs_map), this)); m_pal_4bpp_base = 0x100; m_pal_cursor_base = 0x10; m_pal_border_base = 0x110; @@ -87,7 +87,7 @@ acorn_vidc10_device::acorn_vidc10_device(const machine_config &mconfig, const ch acorn_vidc10_lcd_device::acorn_vidc10_lcd_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : acorn_vidc10_device(mconfig, ACORN_VIDC10_LCD, tag, owner, clock) { - m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, 0, address_map_constructor(FUNC(acorn_vidc10_lcd_device::regs_map), this)); + m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, 0, address_map_constructor(FUNC(acorn_vidc10_lcd_device::regs_map), this)); // TODO: confirm being identical to raster version m_pal_4bpp_base = 0x100; m_pal_cursor_base = 0x10; @@ -296,7 +296,7 @@ WRITE32_MEMBER( acorn_vidc10_device::write ) // TODO: check against mem_mask not 32-bit wide u8 reg = data >> 24; u32 val = data & 0xffffff; - + this->space(AS_IO).write_dword(reg, val); } @@ -346,7 +346,7 @@ WRITE32_MEMBER( acorn_vidc10_device::control_w ) //m_test_mode = (data & 0xc100) != 0xc100; //todo: vga/svga modes sets 0x1000? - m_crtc_regs[CRTC_HDSR] = convert_crtc_hdisplay(0); + m_crtc_regs[CRTC_HDSR] = convert_crtc_hdisplay(0); m_crtc_regs[CRTC_HDER] = convert_crtc_hdisplay(1); screen_vblank_line_update(); screen_dynamic_res_change(); @@ -362,18 +362,18 @@ WRITE32_MEMBER( acorn_vidc10_device::crtc_w ) { switch(offset) { - case CRTC_HCR: m_crtc_regs[CRTC_HCR] = ((data >> 14)<<1)+2; break; -// case CRTC_HSWR: m_crtc_regs[CRTC_HSWR] = (data >> 14)+1; break; - case CRTC_HBSR: m_crtc_regs[CRTC_HBSR] = ((data >> 14)<<1)+1; break; - case CRTC_HDSR: + case CRTC_HCR: m_crtc_regs[CRTC_HCR] = ((data >> 14)<<1)+2; break; +// case CRTC_HSWR: m_crtc_regs[CRTC_HSWR] = (data >> 14)+1; break; + case CRTC_HBSR: m_crtc_regs[CRTC_HBSR] = ((data >> 14)<<1)+1; break; + case CRTC_HDSR: m_crtc_raw_horz[0] = (data >> 14); - m_crtc_regs[CRTC_HDSR] = convert_crtc_hdisplay(0); + m_crtc_regs[CRTC_HDSR] = convert_crtc_hdisplay(0); break; - case CRTC_HDER: + case CRTC_HDER: m_crtc_raw_horz[1] = (data >> 14); - m_crtc_regs[CRTC_HDER] = convert_crtc_hdisplay(1); + m_crtc_regs[CRTC_HDER] = convert_crtc_hdisplay(1); break; - case CRTC_HBER: m_crtc_regs[CRTC_HBER] = ((data >> 14)<<1)+1; break; + case CRTC_HBER: m_crtc_regs[CRTC_HBER] = ((data >> 14)<<1)+1; break; case CRTC_HCSR: m_crtc_regs[CRTC_HCSR] = ((data >> 13) & 0x7ff) + 6; return; // case CRTC_HIR: // ... @@ -440,7 +440,7 @@ WRITE32_MEMBER( acorn_vidc10_device::sound_frequency_w ) //************************************************************************** void acorn_vidc10_device::write_dac(u8 channel, u8 data) -{ +{ int16_t res; res = m_ulaw_lookup[data]; m_dac[channel & 7]->write(res); @@ -572,7 +572,7 @@ void arm_vidc20_device::regs_map(address_map &map) arm_vidc20_device::arm_vidc20_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : acorn_vidc10_device(mconfig, ARM_VIDC20, tag, owner, clock) { - m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, -2, address_map_constructor(FUNC(arm_vidc20_device::regs_map), this)); + m_space_config = address_space_config("regs_space", ENDIANNESS_LITTLE, 32, 8, -2, address_map_constructor(FUNC(arm_vidc20_device::regs_map), this)); m_pal_4bpp_base = 0x000; m_pal_cursor_base = 0x100; m_pal_border_base = 0x100; @@ -634,7 +634,7 @@ inline void arm_vidc20_device::update_8bpp_palette(u16 index, u32 paldata) int r,g,b; // TODO: ext hookup, supremacy plus other stuff according to the manual -// ext = (paldata & 0x0f000000) >> 24; +// ext = (paldata & 0x0f000000) >> 24; b = (paldata & 0x00ff0000) >> 16; g = (paldata & 0x0000ff00) >> 8; r = (paldata & 0x000000ff) >> 0; @@ -670,14 +670,14 @@ u32 arm_vidc20_device::get_pixel_clock() //printf("%d %02x %02x %d %d\n",this->clock(), 1 << m_pixel_rate, m_pixel_source, m_vco_v_modulo, m_vco_r_modulo); if (m_pixel_source == 2) // RCLK return (this->clock() << 1) >> m_pixel_rate; - + // VCLK source is just an external connection - // TODO: get clock from outside world, understand how the modulos are really used, - // understand if SW do some VCO testing before setting CRTC params, + // TODO: get clock from outside world, understand how the modulos are really used, + // understand if SW do some VCO testing before setting CRTC params, // if there isn't a monitor ID mechanism that copes with this if (m_pixel_source == 0) // VCLK return (25175000); - + throw emu_fatalerror("%s unhandled pixel source %02x selected",this->tag(), m_pixel_source); } @@ -685,7 +685,7 @@ WRITE32_MEMBER(arm_vidc20_device::vidc20_crtc_w) { if (offset & 0x8) throw emu_fatalerror("%s accessing CRTC test register %02x, please call the ambulance",this->tag(),offset+0x80); - + const u8 crtc_offset = (offset & 0x7) | ((offset & 0x10) >> 1); switch(crtc_offset) @@ -697,23 +697,23 @@ WRITE32_MEMBER(arm_vidc20_device::vidc20_crtc_w) case CRTC_HDER: m_crtc_regs[CRTC_HDER] = (data&0x7ffe) + 18; break; case CRTC_HBER: m_crtc_regs[CRTC_HBER] = (data&0x7ffe) + 12; break; case CRTC_HCSR: m_crtc_regs[CRTC_HCSR] = (data&0x7fff) + 17; return; -// case CRTC_HIR: +// case CRTC_HIR: case CRTC_VCR: m_crtc_regs[CRTC_VCR] = (data&0x3fff) + 2; break; case CRTC_VSWR: m_crtc_regs[CRTC_VSWR] = (data&0x3fff) + 1; break; case CRTC_VBSR: m_crtc_regs[CRTC_VBSR] = (data&0x3fff) + 1; break; case CRTC_VDSR: m_crtc_regs[CRTC_VDSR] = (data&0x3fff) + 1; break; - case CRTC_VDER: - m_crtc_regs[CRTC_VDER] = (data&0x3fff) + 1; + case CRTC_VDER: + m_crtc_regs[CRTC_VDER] = (data&0x3fff) + 1; screen_vblank_line_update(); break; case CRTC_VBER: m_crtc_regs[CRTC_VBER] = (data&0x3fff) + 1; break; // TODO: bits 15-14 specific for duplex LCD mode - case CRTC_VCSR: - m_crtc_regs[CRTC_VCSR] = (data&0x3fff) + 1; + case CRTC_VCSR: + m_crtc_regs[CRTC_VCSR] = (data&0x3fff) + 1; return; case CRTC_VCER: m_crtc_regs[CRTC_VCER] = (data&0x3fff) + 1; return; } - + screen_dynamic_res_change(); } @@ -722,7 +722,7 @@ WRITE32_MEMBER( arm_vidc20_device::fsynreg_w ) m_vco_r_modulo = data & 0x3f; m_vco_v_modulo = (data >> 8) & 0x3f; // bits 15-14 and 7-6 are test bits - + screen_dynamic_res_change(); } @@ -740,7 +740,7 @@ WRITE32_MEMBER( arm_vidc20_device::vidc20_control_w ) // (data & 0xf0000) >> 16 test mode m_bpp_mode = (data & 0xe0) >> 5; m_crtc_interlace = BIT(data, 12); - + screen_vblank_line_update(); screen_dynamic_res_change(); } @@ -759,7 +759,7 @@ WRITE32_MEMBER( arm_vidc20_device::vidc20_sound_frequency_w ) } void arm_vidc20_device::write_dac32(u8 channel, u16 data) -{ +{ m_dac[channel & 1]->write(data); } diff --git a/src/devices/machine/acorn_vidc.h b/src/devices/machine/acorn_vidc.h index bfa09402ea4..1931e1ee0d6 100644 --- a/src/devices/machine/acorn_vidc.h +++ b/src/devices/machine/acorn_vidc.h @@ -49,7 +49,7 @@ public: void update_sound_mode(bool state) { m_sound_mode = state; refresh_sound_frequency(); } void set_cursor_enable(bool state) { m_cursor_enable = state; } u32 get_cursor_size() { return (m_crtc_regs[CRTC_VCER] - m_crtc_regs[CRTC_VCSR]) * (32/4); } - + protected: acorn_vidc10_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); @@ -105,13 +105,13 @@ private: DECLARE_WRITE32_MEMBER( crtc_w ); DECLARE_WRITE32_MEMBER( sound_frequency_w ); DECLARE_WRITE32_MEMBER( control_w ); - + u8 m_pixel_clock; bool m_cursor_enable; //bool m_flyback; emu_timer *m_video_timer; emu_timer *m_sound_timer; - + std::unique_ptr<u8[]> m_data_vram; std::unique_ptr<u8[]> m_cursor_vram; // TODO: correct data vram size @@ -176,7 +176,7 @@ private: DECLARE_WRITE32_MEMBER( vidc20_sound_frequency_w ); DECLARE_WRITE32_MEMBER( vidc20_sound_control_w ); DECLARE_WRITE32_MEMBER( fsynreg_w ); - + u8 m_pal_data_index; inline void update_8bpp_palette(u16 index, u32 paldata); bool m_dac_serial_mode; diff --git a/src/devices/machine/arm_iomd.cpp b/src/devices/machine/arm_iomd.cpp index ca2683dc8b4..2752c6dffdc 100644 --- a/src/devices/machine/arm_iomd.cpp +++ b/src/devices/machine/arm_iomd.cpp @@ -2,17 +2,17 @@ // copyright-holders:Angelo Salese /************************************************************************************************** - ARM IOMD device emulation - - ARM7 SoC or stand-alone device, upgraded version(s) of the IOC found in Acorn Archimedes. - - TODO: - - IOCR / IOLINES hookups can be further improved, also DDR bits needs verifying; - - word-boundary accesses for 8-bit ports; - - split into different types, add quick notes about where they diverges do in this header; - - keyboard/mouse interface hookup is wrong for PS/2 and unimplemented for quadrature. - I guess we can use connectors over a custom handling, with a terminal mock for testing it - without the overhead of everything else. + ARM IOMD device emulation + + ARM7 SoC or stand-alone device, upgraded version(s) of the IOC found in Acorn Archimedes. + + TODO: + - IOCR / IOLINES hookups can be further improved, also DDR bits needs verifying; + - word-boundary accesses for 8-bit ports; + - split into different types, add quick notes about where they diverges do in this header; + - keyboard/mouse interface hookup is wrong for PS/2 and unimplemented for quadrature. + I guess we can use connectors over a custom handling, with a terminal mock for testing it + without the overhead of everything else. **************************************************************************************************/ @@ -55,35 +55,35 @@ void arm_iomd_device::base_map(address_map &map) map(0x024, 0x027).rw(FUNC(arm_iomd_device::irqrq_r<IRQB>), FUNC(arm_iomd_device::irqrq_w<IRQB>)); map(0x028, 0x02b).rw(FUNC(arm_iomd_device::irqmsk_r<IRQB>), FUNC(arm_iomd_device::irqmsk_w<IRQB>)); -// map(0x030, 0x033).r(FUNC(arm_iomd_device::fiqst_r)); -// map(0x034, 0x037).rw(FUNC(arm_iomd_device::fiqrq_r), FUNC(arm_iomd_device::fiqrq_w)); -// map(0x038, 0x03b).rw(FUNC(arm_iomd_device::fiqmsk_r), FUNC(arm_iomd_device::fiqmsk_w)); +// map(0x030, 0x033).r(FUNC(arm_iomd_device::fiqst_r)); +// map(0x034, 0x037).rw(FUNC(arm_iomd_device::fiqrq_r), FUNC(arm_iomd_device::fiqrq_w)); +// map(0x038, 0x03b).rw(FUNC(arm_iomd_device::fiqmsk_r), FUNC(arm_iomd_device::fiqmsk_w)); // timers map(0x040, 0x043).rw(FUNC(arm_iomd_device::tNlow_r<0>), FUNC(arm_iomd_device::tNlow_w<0>)); map(0x044, 0x047).rw(FUNC(arm_iomd_device::tNhigh_r<0>), FUNC(arm_iomd_device::tNhigh_w<0>)); map(0x048, 0x04b).w(FUNC(arm_iomd_device::tNgo_w<0>)); map(0x04c, 0x04f).w(FUNC(arm_iomd_device::tNlatch_w<0>)); - + map(0x050, 0x053).rw(FUNC(arm_iomd_device::tNlow_r<1>), FUNC(arm_iomd_device::tNlow_w<1>)); map(0x054, 0x057).rw(FUNC(arm_iomd_device::tNhigh_r<1>), FUNC(arm_iomd_device::tNhigh_w<1>)); map(0x058, 0x05b).w(FUNC(arm_iomd_device::tNgo_w<1>)); map(0x05c, 0x05f).w(FUNC(arm_iomd_device::tNlatch_w<1>)); // ROM control -// map(0x080, 0x083).rw(FUNC(arm_iomd_device::romcr_r<0>), FUNC(arm_iomd_device::romcr_w<0>)); -// map(0x084, 0x087).rw(FUNC(arm_iomd_device::romcr_r<1>), FUNC(arm_iomd_device::romcr_w<1>)); -// map(0x08c, 0x08f).rw(FUNC(arm_iomd_device::refcr_r), FUNC(arm_iomd_device::refcr_w)); +// map(0x080, 0x083).rw(FUNC(arm_iomd_device::romcr_r<0>), FUNC(arm_iomd_device::romcr_w<0>)); +// map(0x084, 0x087).rw(FUNC(arm_iomd_device::romcr_r<1>), FUNC(arm_iomd_device::romcr_w<1>)); +// map(0x08c, 0x08f).rw(FUNC(arm_iomd_device::refcr_r), FUNC(arm_iomd_device::refcr_w)); // device identifiers map(0x094, 0x097).r(FUNC(arm_iomd_device::id_r<0>)); map(0x098, 0x09b).r(FUNC(arm_iomd_device::id_r<1>)); map(0x09c, 0x09f).r(FUNC(arm_iomd_device::version_r)); // mouse -// map(0x0a0, 0x0a3) // ... +// map(0x0a0, 0x0a3) // ... // I/O control -// map(0x0c4, 0x0c7).rw(FUNC(arm_iomd_device::iotcr_r), FUNC(arm_iomd_device::iotcr_w)); -// map(0x0c8, 0x0cb).rw(FUNC(arm_iomd_device::ectcr_r), FUNC(arm_iomd_device::ectcr_w)); +// map(0x0c4, 0x0c7).rw(FUNC(arm_iomd_device::iotcr_r), FUNC(arm_iomd_device::iotcr_w)); +// map(0x0c8, 0x0cb).rw(FUNC(arm_iomd_device::ectcr_r), FUNC(arm_iomd_device::ectcr_w)); // sound DMA // TODO: IOMD actually have a sd1* register, rework this map(0x180, 0x183).rw(FUNC(arm_iomd_device::sdcur_r<0>), FUNC(arm_iomd_device::sdcur_w<0>)); @@ -94,19 +94,19 @@ void arm_iomd_device::base_map(address_map &map) map(0x194, 0x197).r(FUNC(arm_iomd_device::sdst_r)); // video DMA -// map(0x1c0, 0x1c3).rw(FUNC(arm_iomd_device::curscur_r), FUNC(arm_iomd_device::curscur_w)); +// map(0x1c0, 0x1c3).rw(FUNC(arm_iomd_device::curscur_r), FUNC(arm_iomd_device::curscur_w)); map(0x1c4, 0x1c7).rw(FUNC(arm_iomd_device::cursinit_r), FUNC(arm_iomd_device::cursinit_w)); -// map(0x1d0, 0x1d3).rw(FUNC(arm_iomd_device::vidcura_r), FUNC(arm_iomd_device::vidcura_w)); +// map(0x1d0, 0x1d3).rw(FUNC(arm_iomd_device::vidcura_r), FUNC(arm_iomd_device::vidcura_w)); map(0x1d4, 0x1d7).rw(FUNC(arm_iomd_device::vidend_r), FUNC(arm_iomd_device::vidend_w)); -// map(0x1d8, 0x1db).rw(FUNC(arm_iomd_device::vidstart_r), FUNC(arm_iomd_device::vidstart_w)); +// map(0x1d8, 0x1db).rw(FUNC(arm_iomd_device::vidstart_r), FUNC(arm_iomd_device::vidstart_w)); map(0x1dc, 0x1df).rw(FUNC(arm_iomd_device::vidinita_r), FUNC(arm_iomd_device::vidinita_w)); map(0x1e0, 0x1e3).rw(FUNC(arm_iomd_device::vidcr_r), FUNC(arm_iomd_device::vidcr_w)); // interrupt DMA map(0x1f0, 0x1f3).r(FUNC(arm_iomd_device::irqst_r<IRQDMA>)); map(0x1f4, 0x1f7).rw(FUNC(arm_iomd_device::irqrq_r<IRQDMA>), FUNC(arm_iomd_device::irqrq_w<IRQDMA>)); - map(0x1f8, 0x1fb).rw(FUNC(arm_iomd_device::irqmsk_r<IRQDMA>), FUNC(arm_iomd_device::irqmsk_w<IRQDMA>)); + map(0x1f8, 0x1fb).rw(FUNC(arm_iomd_device::irqmsk_r<IRQDMA>), FUNC(arm_iomd_device::irqmsk_w<IRQDMA>)); // TODO: iomd2 has extra regs in 0x200-0x3ff area, others NOPs / mirrors? } @@ -114,25 +114,25 @@ void arm_iomd_device::base_map(address_map &map) void arm_iomd_device::map(address_map &map) { arm_iomd_device::base_map(map); -// map(0x088, 0x08b).rw(FUNC(arm_iomd_device::dramcr_r), FUNC(arm_iomd_device::dramcr_w)); +// map(0x088, 0x08b).rw(FUNC(arm_iomd_device::dramcr_r), FUNC(arm_iomd_device::dramcr_w)); // VRAM control -// map(0x08c, 0x08f).rw(FUNC(arm_iomd_device::vrefcr_r), FUNC(arm_iomd_device::vrefcr_w)); +// map(0x08c, 0x08f).rw(FUNC(arm_iomd_device::vrefcr_r), FUNC(arm_iomd_device::vrefcr_w)); // flyback line size -// map(0x090, 0x093).rw(FUNC(arm_iomd_device::fsize_r), FUNC(arm_iomd_device::fsize_w)); +// map(0x090, 0x093).rw(FUNC(arm_iomd_device::fsize_r), FUNC(arm_iomd_device::fsize_w)); // quadrature mouse control -// map(0x0a0, 0x0a3).rw(FUNC(arm_iomd_device::mousex_r), FUNC(arm_iomd_device::mousex_w)); -// map(0x0a4, 0x0a7).rw(FUNC(arm_iomd_device::mousey_r), FUNC(arm_iomd_device::mousey_w)); +// map(0x0a0, 0x0a3).rw(FUNC(arm_iomd_device::mousex_r), FUNC(arm_iomd_device::mousex_w)); +// map(0x0a4, 0x0a7).rw(FUNC(arm_iomd_device::mousey_r), FUNC(arm_iomd_device::mousey_w)); // DACK timing control -// map(0x0c0, 0x0c3).rw(FUNC(arm_iomd_device::dmatcr_r), FUNC(arm_iomd_device::dmatcr_w)); +// map(0x0c0, 0x0c3).rw(FUNC(arm_iomd_device::dmatcr_r), FUNC(arm_iomd_device::dmatcr_w)); // DMA external control -// map(0x0cc, 0x0cf).rw(FUNC(arm_iomd_device::dmaext_r), FUNC(arm_iomd_device::dmaext_w)); +// map(0x0cc, 0x0cf).rw(FUNC(arm_iomd_device::dmaext_r), FUNC(arm_iomd_device::dmaext_w)); // I/O DMA, similar structure as sound DMA -// map(0x100, 0x11f) ch 0 -// map(0x120, 0x13f) ch 1 -// map(0x140, 0x15f) ch 2 -// map(0x160, 0x17f) ch 3 +// map(0x100, 0x11f) ch 0 +// map(0x120, 0x13f) ch 1 +// map(0x140, 0x15f) ch 2 +// map(0x160, 0x17f) ch 3 // sound DMA -// map(0x1a0, 0x1bf) ch 1 +// map(0x1a0, 0x1bf) ch 1 } @@ -152,7 +152,7 @@ arm_iomd_device::arm_iomd_device(const machine_config &mconfig, const char *tag, : arm_iomd_device(mconfig, ARM_IOMD, tag, owner, clock) { m_id = 0xd4e7; - m_version = 0; + m_version = 0; } void arm7500fe_iomd_device::map(address_map &map) @@ -161,37 +161,37 @@ void arm7500fe_iomd_device::map(address_map &map) map(0x00c, 0x00f).rw(FUNC(arm7500fe_iomd_device::iolines_r), FUNC(arm7500fe_iomd_device::iolines_w)); // master clock controls -// map(0x01c, 0x01f).rw(FUNC(arm7500fe_iomd_device::susmode_r), FUNC(arm7500fe_iomd_device::susmode_w)); -// map(0x02c, 0x02f).w(FUNC(arm7500fe_iomd_device::stopmode_w)); +// map(0x01c, 0x01f).rw(FUNC(arm7500fe_iomd_device::susmode_r), FUNC(arm7500fe_iomd_device::susmode_w)); +// map(0x02c, 0x02f).w(FUNC(arm7500fe_iomd_device::stopmode_w)); map(0x03c, 0x03f).rw(FUNC(arm7500fe_iomd_device::clkctl_r), FUNC(arm7500fe_iomd_device::clkctl_w)); // interrupt C/D map(0x060, 0x063).r(FUNC(arm7500fe_iomd_device::irqst_r<IRQC>)); map(0x064, 0x067).rw(FUNC(arm7500fe_iomd_device::irqrq_r<IRQC>), FUNC(arm7500fe_iomd_device::irqrq_w<IRQC>)); - map(0x068, 0x06b).rw(FUNC(arm7500fe_iomd_device::irqmsk_r<IRQC>), FUNC(arm7500fe_iomd_device::irqmsk_w<IRQC>)); -// map(0x06c, 0x06f).rw(FUNC(arm7500fe_iomd_device::vidmux_r), FUNC(arm7500fe_iomd_device::vidmux_w)); + map(0x068, 0x06b).rw(FUNC(arm7500fe_iomd_device::irqmsk_r<IRQC>), FUNC(arm7500fe_iomd_device::irqmsk_w<IRQC>)); +// map(0x06c, 0x06f).rw(FUNC(arm7500fe_iomd_device::vidmux_r), FUNC(arm7500fe_iomd_device::vidmux_w)); map(0x070, 0x073).r(FUNC(arm7500fe_iomd_device::irqst_r<IRQD>)); map(0x074, 0x077).rw(FUNC(arm7500fe_iomd_device::irqrq_r<IRQD>), FUNC(arm7500fe_iomd_device::irqrq_w<IRQD>)); - map(0x078, 0x07b).rw(FUNC(arm7500fe_iomd_device::irqmsk_r<IRQD>), FUNC(arm7500fe_iomd_device::irqmsk_w<IRQD>)); - + map(0x078, 0x07b).rw(FUNC(arm7500fe_iomd_device::irqmsk_r<IRQD>), FUNC(arm7500fe_iomd_device::irqmsk_w<IRQD>)); + // PS/2 mouse -// map(0x0a8, 0x0ab).rw(FUNC(arm7500fe_iomd_device::msedat_r), FUNC(arm7500fe_iomd_device::msedat_w)); +// map(0x0a8, 0x0ab).rw(FUNC(arm7500fe_iomd_device::msedat_r), FUNC(arm7500fe_iomd_device::msedat_w)); map(0x0ac, 0x0af).rw(FUNC(arm7500fe_iomd_device::msecr_r), FUNC(arm7500fe_iomd_device::msecr_w)); // I/O control -// map(0x0cc, 0x0cf).rw(FUNC(arm7500fe_iomd_device::astcr_r), FUNC(arm7500fe_iomd_device::astcr_w)); +// map(0x0cc, 0x0cf).rw(FUNC(arm7500fe_iomd_device::astcr_r), FUNC(arm7500fe_iomd_device::astcr_w)); // RAM control -// map(0x0d0, 0x0d3).rw(FUNC(arm7500fe_iomd_device::dramctl_r), FUNC(arm7500fe_iomd_device::dramctl_w)); -// map(0x0d4, 0x0d7).rw(FUNC(arm7500fe_iomd_device::selfref_r), FUNC(arm7500fe_iomd_device::selfref_w)); +// map(0x0d0, 0x0d3).rw(FUNC(arm7500fe_iomd_device::dramctl_r), FUNC(arm7500fe_iomd_device::dramctl_w)); +// map(0x0d4, 0x0d7).rw(FUNC(arm7500fe_iomd_device::selfref_r), FUNC(arm7500fe_iomd_device::selfref_w)); // A/D converter -// map(0x0e0, 0x0e3).rw(FUNC(arm7500fe_iomd_device::atodicr_r), FUNC(arm7500fe_iomd_device::atodicr_w)); -// map(0x0e4, 0x0e7).r(FUNC(arm7500fe_iomd_device::atodsr_r)); -// map(0x0e8, 0x0eb).rw(FUNC(arm7500fe_iomd_device::atodcc_r), FUNC(arm7500fe_iomd_device::atodcc_w)); -// map(0x0ec, 0x0ef).r(FUNC(arm7500fe_iomd_device::atodcnt_r<0>)); -// map(0x0f0, 0x0f3).r(FUNC(arm7500fe_iomd_device::atodcnt_r<1>)); -// map(0x0f4, 0x0f7).r(FUNC(arm7500fe_iomd_device::atodcnt_r<2>)); -// map(0x0f8, 0x0fb).r(FUNC(arm7500fe_iomd_device::atodcnt_r<3>)); +// map(0x0e0, 0x0e3).rw(FUNC(arm7500fe_iomd_device::atodicr_r), FUNC(arm7500fe_iomd_device::atodicr_w)); +// map(0x0e4, 0x0e7).r(FUNC(arm7500fe_iomd_device::atodsr_r)); +// map(0x0e8, 0x0eb).rw(FUNC(arm7500fe_iomd_device::atodcc_r), FUNC(arm7500fe_iomd_device::atodcc_w)); +// map(0x0ec, 0x0ef).r(FUNC(arm7500fe_iomd_device::atodcnt_r<0>)); +// map(0x0f0, 0x0f3).r(FUNC(arm7500fe_iomd_device::atodcnt_r<1>)); +// map(0x0f4, 0x0f7).r(FUNC(arm7500fe_iomd_device::atodcnt_r<2>)); +// map(0x0f8, 0x0fb).r(FUNC(arm7500fe_iomd_device::atodcnt_r<3>)); // video DMA -// map(0x1c8, 0x1cb).rw(FUNC(arm7500fe_iomd_device::vidcurb_r), FUNC(arm7500fe_iomd_device::vidcurb_w)); -// map(0x1e8, 0x1eb).rw(FUNC(arm7500fe_iomd_device::vidinitb_r), FUNC(arm7500fe_iomd_device::vidinitb_w)); +// map(0x1c8, 0x1cb).rw(FUNC(arm7500fe_iomd_device::vidcurb_r), FUNC(arm7500fe_iomd_device::vidcurb_w)); +// map(0x1e8, 0x1eb).rw(FUNC(arm7500fe_iomd_device::vidinitb_r), FUNC(arm7500fe_iomd_device::vidinitb_w)); } @@ -232,10 +232,10 @@ void arm_iomd_device::device_start() { for (devcb_read_line &cb : m_iocr_read_od_cb) cb.resolve_safe(1); - + for (devcb_write_line &cb : m_iocr_write_od_cb) cb.resolve_safe(); - + m_iocr_read_id_cb.resolve_safe(1); m_iocr_write_id_cb.resolve_safe(); @@ -249,16 +249,16 @@ void arm_iomd_device::device_start() save_item(NAME(m_cursinit)); save_pointer(NAME(m_irq_mask), IRQ_SOURCES_SIZE); save_pointer(NAME(m_irq_status), IRQ_SOURCES_SIZE); - + m_host_space = &m_host_cpu->space(AS_PROGRAM); - + m_timer[0] = timer_alloc(T0_TIMER); m_timer[1] = timer_alloc(T1_TIMER); save_pointer(NAME(m_timer_in), timer_ch_size); save_pointer(NAME(m_timer_out), timer_ch_size); save_pointer(NAME(m_timer_counter), timer_ch_size); save_pointer(NAME(m_timer_readinc), timer_ch_size); - + save_item(NAME(m_sndcur)); save_item(NAME(m_sndend)); save_item(NAME(m_sound_dma_on)); @@ -271,21 +271,21 @@ void arm_iomd_device::device_start() save_pointer(NAME(m_sndstop_reg), sounddma_ch_size); save_pointer(NAME(m_sndlast_reg), sounddma_ch_size); save_pointer(NAME(m_sndbuffer_ok), sounddma_ch_size); - + // TODO: jumps to EASI space at $0c0016xx for RiscPC if POR is on? } void arm7500fe_iomd_device::device_start() { arm_iomd_device::device_start(); - + m_iolines_read_cb.resolve_safe(0xff); m_iolines_write_cb.resolve_safe(); save_item(NAME(m_iolines_ddr)); save_item(NAME(m_cpuclk_divider)); save_item(NAME(m_memclk_divider)); - save_item(NAME(m_ioclk_divider)); + save_item(NAME(m_ioclk_divider)); } //------------------------------------------------- @@ -306,7 +306,7 @@ void arm_iomd_device::device_reset() m_irq_status[i] = 0; m_irq_mask[i] = 0; } - + for (i=0; i<timer_ch_size; i++) m_timer[i]->adjust(attotime::never); @@ -323,7 +323,7 @@ void arm7500fe_iomd_device::device_reset() m_cpuclk_divider = m_ioclk_divider = m_memclk_divider = false; refresh_host_cpu_clocks(); - + m_iolines_ddr = 0xff; } @@ -332,7 +332,7 @@ void arm_iomd_device::device_timer(emu_timer &timer, device_timer_id id, int par switch(id) { case T0_TIMER: - case T1_TIMER: + case T1_TIMER: trigger_irq<IRQA>(id == T1_TIMER ? 0x40 : 0x20); break; } @@ -350,7 +350,7 @@ READ32_MEMBER( arm_iomd_device::iocr_r ) res = m_iocr_read_id_cb() << 3; res|= m_iocr_read_od_cb[1]() << 1; res|= m_iocr_read_od_cb[0]() << 0; - + return (m_vidc->flyback_r() << 7) | 0x34 | (res & m_iocr_ddr); } @@ -375,7 +375,7 @@ READ32_MEMBER( arm_iomd_device::kbdcr_r ) { if (m_kbdc.found()) return m_kbdc->status_r(); - + logerror("%s attempted to read kbdcr with no controller\n", this->tag()); return 0xff; } @@ -398,7 +398,7 @@ WRITE32_MEMBER( arm_iomd_device::kbdcr_w ) m_kbdc->command_w(data & 0xff); return; } - + logerror("%s attempted to write %02x on kbdcr with no controller\n", this->tag(),data & 0xff); } @@ -498,12 +498,12 @@ inline void arm_iomd_device::trigger_timer(unsigned Which) { int timer_count = m_timer_counter[Which]; // TODO: it's actually a 2 MHz timer - int val = timer_count / 2; + int val = timer_count / 2; if(val==0) m_timer[Which]->adjust(attotime::never); else - m_timer[Which]->adjust(attotime::from_usec(val), 0, attotime::from_usec(val)); + m_timer[Which]->adjust(attotime::from_usec(val), 0, attotime::from_usec(val)); } // TODO: live updates aren't really supported here @@ -562,14 +562,14 @@ DECLARE_READ32_MEMBER( version_r ); template <unsigned Which> READ32_MEMBER( arm_iomd_device::sdcur_r ) { return m_sndcur_reg[Which]; } template <unsigned Which> WRITE32_MEMBER( arm_iomd_device::sdcur_w ) { COMBINE_DATA(&m_sndcur_reg[Which]); } -template <unsigned Which> READ32_MEMBER( arm_iomd_device::sdend_r ) +template <unsigned Which> READ32_MEMBER( arm_iomd_device::sdend_r ) { - return (m_sndstop_reg[Which] << 31) | (m_sndlast_reg[Which] << 30) | (m_sndend_reg[Which] & 0x00fffff0); + return (m_sndstop_reg[Which] << 31) | (m_sndlast_reg[Which] << 30) | (m_sndend_reg[Which] & 0x00fffff0); } -template <unsigned Which> WRITE32_MEMBER( arm_iomd_device::sdend_w ) -{ - COMBINE_DATA(&m_sndend_reg[Which]); +template <unsigned Which> WRITE32_MEMBER( arm_iomd_device::sdend_w ) +{ + COMBINE_DATA(&m_sndend_reg[Which]); m_sndend_reg[Which] &= 0x00fffff0; m_sndstop_reg[Which] = BIT(data, 31); m_sndlast_reg[Which] = BIT(data, 30); @@ -594,7 +594,7 @@ WRITE32_MEMBER( arm_iomd_device::sdcr_w ) { // ... } - + // TODO: bit 7 resets sound DMA } @@ -686,12 +686,12 @@ WRITE_LINE_MEMBER( arm_iomd_device::vblank_irq ) src++; src &= 0x1fffffff; } - + if (m_cursor_enable == true) { src = m_cursinit; size = m_vidc->get_cursor_size(); - + // TODO: same as above for (u32 m_curscur = 0; m_curscur<size; m_curscur++) { @@ -708,7 +708,7 @@ inline void arm_iomd_device::sounddma_swap_buffer() m_sndcur = m_sndcur_reg[m_sndcur_buffer]; m_sndend = m_sndcur + (m_sndend_reg[m_sndcur_buffer] + 0x10); m_sndbuffer_ok[m_sndcur_buffer] = true; - + // TODO: actual condition for int m_snd_overrun = false; m_snd_int = false; @@ -718,14 +718,14 @@ WRITE_LINE_MEMBER( arm_iomd_device::sound_drq ) { if (!state) return; - + if (m_vidc->get_dac_mode() == true) { for (int ch=0;ch<2;ch++) m_vidc->write_dac32(ch, (m_host_space->read_word(m_sndcur + ch*2))); - + m_sndcur += 4; - + if (m_sndcur >= m_sndend) { // TODO: interrupt bit diff --git a/src/devices/machine/arm_iomd.h b/src/devices/machine/arm_iomd.h index c996a88b3dd..668c55d284c 100644 --- a/src/devices/machine/arm_iomd.h +++ b/src/devices/machine/arm_iomd.h @@ -2,7 +2,7 @@ // copyright-holders:Angelo Salese /*************************************************************************** - ARM IOMD device emulation + ARM IOMD device emulation ***************************************************************************/ @@ -63,11 +63,11 @@ protected: virtual void device_start() override; virtual void device_reset() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - + void base_map(address_map &map); u16 m_id; u8 m_version; - + enum { IRQA = 0, IRQB, @@ -97,12 +97,12 @@ private: DECLARE_READ32_MEMBER( iocr_r ); DECLARE_WRITE32_MEMBER( iocr_w ); - + DECLARE_READ32_MEMBER( kbddat_r ); DECLARE_WRITE32_MEMBER( kbddat_w ); DECLARE_READ32_MEMBER( kbdcr_r ); DECLARE_WRITE32_MEMBER( kbdcr_w ); - + u32 m_vidinita, m_vidend; bool m_vidlast, m_videqual; bool m_video_enable; @@ -116,7 +116,7 @@ private: bool m_cursor_enable; DECLARE_READ32_MEMBER( cursinit_r ); DECLARE_WRITE32_MEMBER( cursinit_w ); - + static constexpr int sounddma_ch_size = 2; u32 m_sndcur, m_sndend; u32 m_sndcur_reg[sounddma_ch_size], m_sndend_reg[sounddma_ch_size]; @@ -148,22 +148,22 @@ private: u16 m_timer_in[2]; u16 m_timer_out[2]; int m_timer_counter[2]; - u8 m_timer_readinc[2]; + u8 m_timer_readinc[2]; emu_timer *m_timer[2]; - + template <unsigned Which> DECLARE_READ32_MEMBER( tNlow_r ); template <unsigned Which> DECLARE_READ32_MEMBER( tNhigh_r ); template <unsigned Which> DECLARE_WRITE32_MEMBER( tNlow_w ); template <unsigned Which> DECLARE_WRITE32_MEMBER( tNhigh_w ); template <unsigned Which> DECLARE_WRITE32_MEMBER( tNgo_w ); template <unsigned Which> DECLARE_WRITE32_MEMBER( tNlatch_w ); - + template <unsigned Nibble> DECLARE_READ32_MEMBER( id_r ); DECLARE_READ32_MEMBER( version_r ); - + // used in vidcr_r / sndcr_r, documentation hints this is a purged idea during chip development, to be checked out static constexpr u8 dmaid_size = 0x10; // qword transfer -// constexpr u8 dmaid_mask = 0x1f; +// constexpr u8 dmaid_mask = 0x1f; }; class arm7500fe_iomd_device : public arm_iomd_device @@ -188,11 +188,11 @@ private: inline void refresh_host_cpu_clocks(); DECLARE_READ32_MEMBER( clkctl_r ); DECLARE_WRITE32_MEMBER( clkctl_w ); - + u8 m_iolines_ddr; DECLARE_READ32_MEMBER( iolines_r ); DECLARE_WRITE32_MEMBER( iolines_w ); - + DECLARE_READ32_MEMBER( msecr_r ); DECLARE_WRITE32_MEMBER( msecr_w ); }; diff --git a/src/devices/machine/sun4c_mmu.cpp b/src/devices/machine/sun4c_mmu.cpp index 4ea51352568..3d2bf1b9297 100644 --- a/src/devices/machine/sun4c_mmu.cpp +++ b/src/devices/machine/sun4c_mmu.cpp @@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(SUN4C_MMU, sun4c_mmu_device, "sun4c_mmu", "Sun 4c MMU") #define LOG_TYPE1_TIMEOUT (1U << 12) #define LOG_UNKNOWN_SPACE (1U << 13) #define LOG_WRITE_PROTECT (1U << 14) -#define LOG_PARITY (1U << 15) +#define LOG_PARITY (1U << 15) #define LOG_ALL_ASI (1U << 16) // WARNING: Heavy! #define VERBOSE (0) @@ -433,7 +433,7 @@ void sun4_mmu_base_device::system_w(const uint32_t offset, const uint32_t data, m_cachetags[(offset >> 3) & m_cache_tag_mask] = data & 0x03f8fffc; /*if (m_cpu->pc() == 0xFFE8B4F8) { - m_log_mem = true; + m_log_mem = true; }*/ return; diff --git a/src/devices/machine/sunplus_gcm394.cpp b/src/devices/machine/sunplus_gcm394.cpp index 6e1681fa800..ed5ec37ff07 100644 --- a/src/devices/machine/sunplus_gcm394.cpp +++ b/src/devices/machine/sunplus_gcm394.cpp @@ -56,7 +56,7 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::system_dma_trigger_w) uint32_t dest = m_dma_params[2] | (m_dma_params[5] << 16) ; uint32_t length = m_dma_params[3] | (m_dma_params[6] << 16); - LOGMASKED(LOG_GCM394_SYSDMA, "%s:possible DMA operation (7abf) (trigger %04x) with params mode:%04x source:%08x (word offset) dest:%08x (word offset) length:%08x (words)\n", machine().describe_context(), data, mode, source, dest, length ); + LOGMASKED(LOG_GCM394_SYSDMA, "%s:possible DMA operation (7abf) (trigger %04x) with params mode:%04x source:%08x (word offset) dest:%08x (word offset) length:%08x (words)\n", machine().describe_context(), data, mode, source, dest, length ); if (source >= 0x20000) LOGMASKED(LOG_GCM394_SYSDMA, " likely transfer from ROM %08x - %08x\n", (source - 0x20000) * 2, (source - 0x20000) * 2 + (length * 2)- 1); @@ -66,8 +66,8 @@ WRITE16_MEMBER(sunplus_gcm394_base_device::system_dma_trigger_w) // mode 0x0089 == no source inc, used for memory clear operations? (source usually points at stack value) // mode 0x0009 == regular copy? (smartfp does 2 copies like this after the initial clears, source definitely points at a correctly sized data structure) // what does having bit 0x4000 on mode set mean? (first transfer on wrlshunt - maybe an IRQ disable?) - - if ((mode == 0x0089) || (mode == 0x0009) || (mode == 0x4009)) + + if ((mode == 0x0089) || (mode == 0x0009) || (mode == 0x4009)) { for (int i = 0; i < length; i++) { @@ -434,7 +434,7 @@ void sunplus_gcm394_base_device::gcm394_internal_map(address_map &map) map(0x007816, 0x007816).w(FUNC(sunplus_gcm394_base_device::unkarea_7816_w)); map(0x007817, 0x007817).w(FUNC(sunplus_gcm394_base_device::unkarea_7817_w)); - // wrlshunt | smartfp + // wrlshunt | smartfp map(0x007820, 0x007820).w(FUNC(sunplus_gcm394_base_device::unkarea_7820_w)); // 7f8a (7f8a before DMA from ROM to RAM, 008a after DMA from ROM to RAM) | 3f04 map(0x007821, 0x007821).w(FUNC(sunplus_gcm394_base_device::unkarea_7821_w)); // 7f47 | 0044 map(0x007822, 0x007822).w(FUNC(sunplus_gcm394_base_device::unkarea_7822_w)); // 0047 | 1f44 @@ -569,7 +569,7 @@ void generalplus_gpac800_device::gpac800_internal_map(address_map& map) map(0x007854, 0x007854).r(FUNC(generalplus_gpac800_device::unkarea_7854_r)); // data read port (timing appears to be important) } - + void sunplus_gcm394_base_device::device_start() { unsp_20_device::device_start(); @@ -694,10 +694,10 @@ IRQ_CALLBACK_MEMBER(sunplus_gcm394_base_device::irq_vector_cb) void sunplus_gcm394_base_device::checkirq6() { /* - if (m_7935 & 0x0100) - set_state_unsynced(UNSP_IRQ6_LINE, ASSERT_LINE); - else - set_state_unsynced(UNSP_IRQ6_LINE, CLEAR_LINE); + if (m_7935 & 0x0100) + set_state_unsynced(UNSP_IRQ6_LINE, ASSERT_LINE); + else + set_state_unsynced(UNSP_IRQ6_LINE, CLEAR_LINE); */ } @@ -736,7 +736,7 @@ void sunplus_gcm394_base_device::device_timer(emu_timer &timer, device_timer_id set_state_unsynced(UNSP_IRQ6_LINE, ASSERT_LINE); //set_state_unsynced(UNSP_IRQ4_LINE, ASSERT_LINE); - // checkirq6(); + // checkirq6(); break; } } @@ -755,8 +755,8 @@ WRITE_LINE_MEMBER(sunplus_gcm394_base_device::videoirq_w) uint16_t sunplus_gcm394_base_device::read_space(uint32_t offset) { -// uint16_t b = m_gfxregion[(offset * 2) & (m_gfxregionsize - 1)] | (m_gfxregion[(offset * 2 + 1) & (m_gfxregionsize - 1)] << 8); -// return b; +// uint16_t b = m_gfxregion[(offset * 2) & (m_gfxregionsize - 1)] | (m_gfxregion[(offset * 2 + 1) & (m_gfxregionsize - 1)] << 8); +// return b; address_space& mem = this->space(AS_PROGRAM); uint16_t retdata = mem.read_word(offset); return retdata; diff --git a/src/devices/machine/sunplus_gcm394_video.cpp b/src/devices/machine/sunplus_gcm394_video.cpp index e3f0a789540..b74441fe5b2 100644 --- a/src/devices/machine/sunplus_gcm394_video.cpp +++ b/src/devices/machine/sunplus_gcm394_video.cpp @@ -46,7 +46,7 @@ void gcm394_base_video_device::decodegfx(const char* tag) uint8_t* gfxregion = memregion(tag)->base(); int gfxregionsize = memregion(tag)->bytes(); - + if (1) { gfx_layout obj_layout = @@ -153,7 +153,7 @@ void gcm394_base_video_device::decodegfx(const char* tag) m_gfxdecode->set_gfx(m_maxgfxelement, std::make_unique<gfx_element>(m_palette, obj_layout, gfxregion, 0, 0x40 * 0x10, 0)); m_maxgfxelement++; } - + if (1) { gfx_layout obj_layout = @@ -240,7 +240,7 @@ void gcm394_base_video_device::device_reset() m_702a = 0x0000; m_7030_brightness = 0x0000; m_703c = 0x0000; - + m_7042_sprite = 0x0000; m_7080 = 0x0000; @@ -284,7 +284,7 @@ void gcm394_base_video_device::draw(const rectangle &cliprect, uint32_t line, ui uint32_t bits_per_row = nc_bpp * w / 16; uint32_t words_per_tile; - + if (addressing_mode == 1) { words_per_tile = bits_per_row * h; @@ -454,7 +454,7 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca blend = (tileattr & 0x4000 || tilectrl & 0x0100); row_scroll = (tilectrl & 0x0010); - + int use_alt_drawmode; if ((ctrl_reg & 2) == 0) @@ -472,7 +472,7 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca tile |= (palette & 0x0007) << 16; use_alt_drawmode = 0; } - + //palette_offset |= 0x0900; palette_offset |= 0x0100; @@ -520,7 +520,7 @@ void gcm394_base_video_device::draw_page(const rectangle &cliprect, uint32_t sca void gcm394_base_video_device::draw_sprite(const rectangle &cliprect, uint32_t scanline, int priority, uint32_t base_addr) { - uint32_t bitmap_addr = (m_sprite_702d_gfxbase_msb << 16) | m_sprite_7022_gfxbase_lsb; + uint32_t bitmap_addr = (m_sprite_702d_gfxbase_msb << 16) | m_sprite_7022_gfxbase_lsb; uint32_t tile = m_spriteram[base_addr + 0]; int16_t x = m_spriteram[base_addr + 1]; int16_t y = m_spriteram[base_addr + 2]; @@ -573,7 +573,7 @@ void gcm394_base_video_device::draw_sprite(const rectangle &cliprect, uint32_t s } bool blend = (attr & 0x4000); - + bool flip_x = false; // different attribute use? @@ -698,14 +698,14 @@ WRITE16_MEMBER(gcm394_base_video_device::tmap0_tilebase_lsb_w) { LOGMASKED(LOG_GCM394_TMAP, "%s:gcm394_base_video_device::tmap0_tilebase_lsb_w %04x\n", machine().describe_context(), data); m_page0_addr_lsb = data; - LOGMASKED(LOG_GCM394_TMAP, " (tmap0 tilegfxbase is now %04x%04x)\n", m_page0_addr_msb, m_page0_addr_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(tmap0 tilegfxbase is now %04x%04x)\n", m_page0_addr_msb, m_page0_addr_lsb); } WRITE16_MEMBER(gcm394_base_video_device::tmap0_tilebase_msb_w) { LOGMASKED(LOG_GCM394_TMAP, "%s:gcm394_base_video_device::tmap0_tilebase_msb_w %04x\n", machine().describe_context(), data); m_page0_addr_msb = data; - LOGMASKED(LOG_GCM394_TMAP, " (tmap0 tilegfxbase is now %04x%04x)\n", m_page0_addr_msb, m_page0_addr_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(tmap0 tilegfxbase is now %04x%04x)\n", m_page0_addr_msb, m_page0_addr_lsb); } // **************************************** TILEMAP 1 ************************************************* @@ -722,14 +722,14 @@ WRITE16_MEMBER(gcm394_base_video_device::tmap1_tilebase_lsb_w) { LOGMASKED(LOG_GCM394_TMAP, "%s:gcm394_base_video_device::tmap1_tilebase_lsb_w %04x\n", machine().describe_context(), data); m_page1_addr_lsb = data; - LOGMASKED(LOG_GCM394_TMAP, " (tmap1 tilegfxbase is now %04x%04x)\n", m_page1_addr_msb, m_page1_addr_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(tmap1 tilegfxbase is now %04x%04x)\n", m_page1_addr_msb, m_page1_addr_lsb); } WRITE16_MEMBER(gcm394_base_video_device::tmap1_tilebase_msb_w) { LOGMASKED(LOG_GCM394_TMAP, "%s:gcm394_base_video_device::tmap1_tilebase_msb_w %04x\n", machine().describe_context(), data); m_page1_addr_msb = data; - LOGMASKED(LOG_GCM394_TMAP, " (tmap1 tilegfxbase is now %04x%04x)\n", m_page1_addr_msb, m_page1_addr_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(tmap1 tilegfxbase is now %04x%04x)\n", m_page1_addr_msb, m_page1_addr_lsb); } // **************************************** unknown video device handler for below ************************************************* @@ -749,9 +749,9 @@ void gcm394_base_video_device::unk_vid_regs_w(int which, int offset, uint16_t da case 0x1: LOGMASKED(LOG_GCM394_VIDEO, "%s: unk_vid_regs_w (unk chip %d) (offset %01x) (data %04x) (y scroll?)\n", machine().describe_context(), which, offset, data); // masked with 0x3ff in code like x-scroll for tilemaps break; - + case 0x05: // seems to be similar / the same as Page Control for tilemaps (written with same basic code, but for these layers) - LOGMASKED(LOG_GCM394_VIDEO, "%s: unk_vid_regs_w (unk chip %d) (offset %01x) (data %04x) (Page Control?)\n", machine().describe_context(), which, offset, data); + LOGMASKED(LOG_GCM394_VIDEO, "%s: unk_vid_regs_w (unk chip %d) (offset %01x) (data %04x) (Page Control?)\n", machine().describe_context(), which, offset, data); break; case 0x02: // startup? @@ -776,14 +776,14 @@ WRITE16_MEMBER(gcm394_base_video_device::unk_vid1_gfxbase_lsb_w) { LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::unk_vid1_gfxbase_lsb_w %04x\n", machine().describe_context(), data); m_unk_vid1_gfxbase_lsb = data; - LOGMASKED(LOG_GCM394_TMAP, " (unk_vid1 tilegfxbase is now %04x%04x)\n", m_unk_vid1_gfxbase_msb, m_unk_vid1_gfxbase_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid1 tilegfxbase is now %04x%04x)\n", m_unk_vid1_gfxbase_msb, m_unk_vid1_gfxbase_lsb); } WRITE16_MEMBER(gcm394_base_video_device::unk_vid1_gfxbase_msb_w) { LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::unk_vid1_gfxbase_msb_w %04x\n", machine().describe_context(), data); m_unk_vid1_gfxbase_msb = data; - LOGMASKED(LOG_GCM394_TMAP, " (unk_vid1 tilegfxbase is now %04x%04x)\n", m_unk_vid1_gfxbase_msb, m_unk_vid1_gfxbase_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid1 tilegfxbase is now %04x%04x)\n", m_unk_vid1_gfxbase_msb, m_unk_vid1_gfxbase_lsb); } // **************************************** unknown video device 2 (another tilemap? roz? lines? zooming sprite layer?) ************************************************* @@ -797,14 +797,14 @@ WRITE16_MEMBER(gcm394_base_video_device::unk_vid2_gfxbase_lsb_w) { LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::unk_vid2_gfxbase_lsb_w %04x\n", machine().describe_context(), data); m_unk_vid2_gfxbase_lsb = data; - LOGMASKED(LOG_GCM394_TMAP, " (unk_vid2 tilegfxbase is now %04x%04x)\n", m_unk_vid2_gfxbase_msb, m_unk_vid2_gfxbase_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid2 tilegfxbase is now %04x%04x)\n", m_unk_vid2_gfxbase_msb, m_unk_vid2_gfxbase_lsb); } WRITE16_MEMBER(gcm394_base_video_device::unk_vid2_gfxbase_msb_w) { LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::unk_vid2_gfxbase_msb_w %04x\n", machine().describe_context(), data); m_unk_vid2_gfxbase_msb = data; - LOGMASKED(LOG_GCM394_TMAP, " (unk_vid2 tilegfxbase is now %04x%04x)\n", m_unk_vid2_gfxbase_msb, m_unk_vid2_gfxbase_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(unk_vid2 tilegfxbase is now %04x%04x)\n", m_unk_vid2_gfxbase_msb, m_unk_vid2_gfxbase_lsb); } // **************************************** sprite control registers ************************************************* @@ -815,14 +815,14 @@ WRITE16_MEMBER(gcm394_base_video_device::sprite_7022_gfxbase_lsb_w) { LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::sprite_7022_gfxbase_lsb_w %04x\n", machine().describe_context(), data); m_sprite_7022_gfxbase_lsb = data; - LOGMASKED(LOG_GCM394_TMAP, " (sprite tilebase is now %04x%04x)\n", m_sprite_702d_gfxbase_msb, m_sprite_7022_gfxbase_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(sprite tilebase is now %04x%04x)\n", m_sprite_702d_gfxbase_msb, m_sprite_7022_gfxbase_lsb); } WRITE16_MEMBER(gcm394_base_video_device::sprite_702d_gfxbase_msb_w) { LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::sprite_702d_gfxbase_msb_w %04x\n", machine().describe_context(), data); m_sprite_702d_gfxbase_msb = data; - LOGMASKED(LOG_GCM394_TMAP, " (sprite tilebase tilegfxbase is now %04x%04x)\n", m_sprite_702d_gfxbase_msb, m_sprite_7022_gfxbase_lsb); + LOGMASKED(LOG_GCM394_TMAP, "\t(sprite tilebase tilegfxbase is now %04x%04x)\n", m_sprite_702d_gfxbase_msb, m_sprite_7022_gfxbase_lsb); } READ16_MEMBER(gcm394_base_video_device::sprite_7042_extra_r) @@ -882,7 +882,7 @@ WRITE16_MEMBER(gcm394_base_video_device::video_dma_unk_w) } READ16_MEMBER(gcm394_base_video_device::video_707c_r) -{ +{ LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::video_707c_r\n", machine().describe_context()); return 0x8000; } @@ -936,11 +936,11 @@ WRITE16_MEMBER(gcm394_base_video_device::video_707f_w) { if (data & mask) { - LOGMASKED(LOG_GCM394_VIDEO, " bit %04x Low -> High\n", mask); + LOGMASKED(LOG_GCM394_VIDEO, "\tbit %04x Low -> High\n", mask); } else { - LOGMASKED(LOG_GCM394_VIDEO, " bit %04x High -> Low\n", mask); + LOGMASKED(LOG_GCM394_VIDEO, "\tbit %04x High -> Low\n", mask); } } } @@ -964,7 +964,7 @@ READ16_MEMBER(gcm394_base_video_device::video_7062_r) { LOGMASKED(LOG_GCM394_VID WRITE16_MEMBER(gcm394_base_video_device::video_7062_w) { LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::video_7062_w %04x\n", machine().describe_context(), data); m_7062 = data; } READ16_MEMBER(gcm394_base_video_device::video_7063_videoirq_source_r) -{ +{ LOGMASKED(LOG_GCM394_VIDEO, "%s:gcm394_base_video_device::video_7063_videoirq_source_r\n", machine().describe_context()); return machine().rand(); } @@ -1036,7 +1036,7 @@ WRITE16_MEMBER(gcm394_base_video_device::spriteram_w) { // transfers an additional word for each sprite with this bit set (smartfp) or an entire extra bank (wrlshunt) // wrlshunt instead seems to base if it writes the extra data based on 707f so maybe this is more complex than banking - + // however for 707e only 0/1 is written, and it also gets written before system DMA, so despite being in the video DMA // region seems to operate separate from that. diff --git a/src/devices/sound/saa1099.h b/src/devices/sound/saa1099.h index 3ffb3e9d3d5..1452bdcb93c 100644 --- a/src/devices/sound/saa1099.h +++ b/src/devices/sound/saa1099.h @@ -58,7 +58,7 @@ private: /* vars to simulate the noise generator output */ double counter = 0.0; - double freq = 0.0; + double freq = 0.0; u32 level = 0xffffffffU; // noise polynomial shifter }; diff --git a/src/lib/netlist/examples/7400_astable.c b/src/lib/netlist/examples/7400_astable.c index 07748a0816a..d20ededb6f7 100644 --- a/src/lib/netlist/examples/7400_astable.c +++ b/src/lib/netlist/examples/7400_astable.c @@ -9,27 +9,27 @@ NETLIST_START(7400_astable) - /* - * Astable multivibrator using two 7400 gates (or inverters) - * - */ - - /* Standard stuff */ - - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-5) - - // astable NAND Multivibrator ==> f ~ 1.0 / (3 * R * C) - RES(R1, 4700) - CAP(C1, 0.22e-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) - - LOG(logC12, C1.2) - LOG(logn1Q, n1.Q) - LOG(logn2Q, n2.Q) + /* + * Astable multivibrator using two 7400 gates (or inverters) + * + */ + + /* Standard stuff */ + + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-5) + + // astable NAND Multivibrator ==> f ~ 1.0 / (3 * R * C) + RES(R1, 4700) + CAP(C1, 0.22e-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) + + LOG(logC12, C1.2) + LOG(logn1Q, n1.Q) + LOG(logn2Q, n2.Q) NETLIST_END() diff --git a/src/lib/netlist/examples/74123_mstable.c b/src/lib/netlist/examples/74123_mstable.c index aa21f4fe215..38e3f5f2072 100644 --- a/src/lib/netlist/examples/74123_mstable.c +++ b/src/lib/netlist/examples/74123_mstable.c @@ -9,39 +9,39 @@ NETLIST_START(74123_mstable) - /* - * Monoflog - * - */ + /* + * Monoflog + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) + SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) // 5V + ANALOG_INPUT(V5, 5) // 5V - /* Wiring up the 74123 */ + /* Wiring up the 74123 */ - CLOCK(clk, 50) - TTL_74123(mf) + CLOCK(clk, 50) + TTL_74123(mf) - RES(R, 10000) - CAP(C, 1e-6) + RES(R, 10000) + CAP(C, 1e-6) - NET_C(GND, mf.GND) - NET_C(V5, mf.VCC) + NET_C(GND, mf.GND) + NET_C(V5, mf.VCC) - NET_C(C.1, mf.C) - NET_C(mf.C, GND) - NET_C(C.2, mf.RC, R.2) - NET_C(R.1, V5) + NET_C(C.1, mf.C) + NET_C(mf.C, GND) + NET_C(C.2, mf.RC, R.2) + NET_C(R.1, V5) - NET_C(mf.CLRQ, V5) - NET_C(mf.B, V5) - NET_C(mf.A, clk.Q) + NET_C(mf.CLRQ, V5) + NET_C(mf.B, V5) + NET_C(mf.A, clk.Q) - LOG(log_C, C.2) - LOG(log_Q, mf.Q) - LOG(log_X, clk.Q) + LOG(log_C, C.2) + LOG(log_Q, mf.Q) + LOG(log_X, clk.Q) NETLIST_END() diff --git a/src/lib/netlist/examples/7414.cpp b/src/lib/netlist/examples/7414.cpp index 0fcfde9a7f4..e7c01ce85d3 100644 --- a/src/lib/netlist/examples/7414.cpp +++ b/src/lib/netlist/examples/7414.cpp @@ -9,17 +9,17 @@ NETLIST_START(7414_astable) - /* - * Simple oscillator with 74LS14 - * - * ./nltool -f nl_examples/7414.cpp -l C37.1 -l U4A1.Q - * - */ + /* + * Simple oscillator with 74LS14 + * + * ./nltool -f nl_examples/7414.cpp -l C37.1 -l U4A1.Q + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-8) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-8) TTL_74LS14_GATE(U4A1) //TTL_7404_GATE(U4A1) diff --git a/src/lib/netlist/examples/9602_mstable.c b/src/lib/netlist/examples/9602_mstable.c index 8e482c8dfb3..164241886b9 100644 --- a/src/lib/netlist/examples/9602_mstable.c +++ b/src/lib/netlist/examples/9602_mstable.c @@ -9,45 +9,45 @@ NETLIST_START(74123_mstable) - /* - * Monoflog - * - */ + /* + * Monoflog + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) + SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) // 5V + ANALOG_INPUT(V5, 5) // 5V - /* Wiring up the 74123 */ + /* Wiring up the 74123 */ - CLOCK(clk, 50) - TTL_9602_DIP(mf) + CLOCK(clk, 50) + TTL_9602_DIP(mf) - RES(R, 10000) - CAP(C, 1e-6) + RES(R, 10000) + CAP(C, 1e-6) - NET_C(GND, mf.8) // - NET_C(V5, mf.16) // + NET_C(GND, mf.8) // + NET_C(V5, mf.16) // - NET_C(C.1, mf.1) - NET_C(mf.1, GND) // Test - can be removed - NET_C(C.2, mf.2, R.2) - NET_C(R.1, V5) + NET_C(C.1, mf.1) + NET_C(mf.1, GND) // Test - can be removed + NET_C(C.2, mf.2, R.2) + NET_C(R.1, V5) - NET_C(mf.3, V5) // CLR - NET_C(mf.4, GND) // B - NET_C(mf.5, clk.Q) // A + NET_C(mf.3, V5) // CLR + NET_C(mf.4, GND) // B + NET_C(mf.5, clk.Q) // A - LOG(logC, C.2) - LOG(logQ, mf.6) //Q - LOG(logX, clk.Q) + LOG(logC, C.2) + LOG(logQ, mf.6) //Q + LOG(logX, clk.Q) - // avoid non connected inputs + // avoid non connected inputs - NET_C(mf.11, V5) - NET_C(mf.12, V5) - NET_C(mf.13, V5) + NET_C(mf.11, V5) + NET_C(mf.12, V5) + NET_C(mf.13, V5) NETLIST_END() diff --git a/src/lib/netlist/examples/LM3900_test.cpp b/src/lib/netlist/examples/LM3900_test.cpp index 0498b4d2f0b..32ceb066864 100644 --- a/src/lib/netlist/examples/LM3900_test.cpp +++ b/src/lib/netlist/examples/LM3900_test.cpp @@ -20,14 +20,14 @@ NETLIST_START(main) - /* Standard stuff */ - - //VARCLOCK(clk, "0.5 / pow(10, 1 + T * 4)") - //CLOCK(clk, 1000) - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-10) - PARAM(Solver.NR_LOOPS, 300) - PARAM(Solver.DYNAMIC_TS, 1) + /* Standard stuff */ + + //VARCLOCK(clk, "0.5 / pow(10, 1 + T * 4)") + //CLOCK(clk, 1000) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-10) + PARAM(Solver.NR_LOOPS, 300) + PARAM(Solver.DYNAMIC_TS, 1) PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 1e-7) VS(vs, 0) @@ -57,47 +57,47 @@ NETLIST_START(main) PARAM(vs.R, 0.1) ALIAS(clk, vs.1) NET_C(vs.2, GND) - ANALOG_INPUT(V9, 9) - ANALOG_INPUT(V12, 12) - ANALOG_INPUT(VM12, -12) + ANALOG_INPUT(V9, 9) + ANALOG_INPUT(V12, 12) + ANALOG_INPUT(VM12, -12) - //OPAMP(op, OPAMP_TEST) + //OPAMP(op, OPAMP_TEST) LM3900(op) - NET_C(op.GND, VM12) - NET_C(op.VCC, V12) + NET_C(op.GND, VM12) + NET_C(op.VCC, V12) - /* Opamp B wired as inverting amplifier connected to output of first opamp */ + /* Opamp B wired as inverting amplifier connected to output of first opamp */ - RES(R1, 50) - RES(RP, 500000) // Set to R2 * 2 if VPlus == VCC (see datasheet) - RES(R2, 500000) + RES(R1, 50) + RES(RP, 500000) // Set to R2 * 2 if VPlus == VCC (see datasheet) + RES(R2, 500000) - NET_C(op.PLUS, RP.1) + NET_C(op.PLUS, RP.1) //NET_C(RP.2, V9) NET_C(RP.2, GND) //NET_C(RP.2, V12) - NET_C(op.MINUS, R2.2) - NET_C(op.MINUS, R1.2) + NET_C(op.MINUS, R2.2) + NET_C(op.MINUS, R1.2) CAP(C, 10e-6) NET_C(clk, C.1) - NET_C(C.2, R1.1) - NET_C(op.OUT, R2.1) + NET_C(C.2, R1.1) + NET_C(op.OUT, R2.1) CAP(CL, 10.0e-6) - RES(RL, 2000) - NET_C(RL.2, GND) - NET_C(RL.1, CL.2) + RES(RL, 2000) + NET_C(RL.2, GND) + NET_C(RL.1, CL.2) NET_C(CL.1, op.OUT) AFUNC(f, 1, "A0 * 1000") NET_C(f.A0, RL.1) #if 1 - LOG(log_Y, R1.1) - LOG(log_Z, f) + LOG(log_Y, R1.1) + LOG(log_Z, f) #endif NETLIST_END() diff --git a/src/lib/netlist/examples/bjt.c b/src/lib/netlist/examples/bjt.c index 7222ced4445..f28c070910a 100644 --- a/src/lib/netlist/examples/bjt.c +++ b/src/lib/netlist/examples/bjt.c @@ -9,38 +9,38 @@ #include "netlist/devices/net_lib.h" NETLIST_START(bjt) - /* Standard stuff */ + /* Standard stuff */ - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) - ANALOG_INPUT(V3, 3.5) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) + ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V3, 3.5) - /* NPN - example */ + /* NPN - example */ - QBJT_SW(Q, "BC237B") - RES(RB, 1000) - RES(RC, 1000) + QBJT_SW(Q, "BC237B") + RES(RB, 1000) + RES(RC, 1000) - NET_C(RC.1, V5) - NET_C(RC.2, Q.C) - NET_C(RB.1, clk) - NET_C(RB.2, Q.B) - NET_C(Q.E, GND) + NET_C(RC.1, V5) + NET_C(RC.2, Q.C) + NET_C(RB.1, clk) + NET_C(RB.2, Q.B) + NET_C(Q.E, GND) - /* PNP - example */ + /* PNP - example */ - QBJT_SW(Q1, "BC556B") - RES(RB1, 1000) - RES(RC1, 1000) + QBJT_SW(Q1, "BC556B") + RES(RB1, 1000) + RES(RC1, 1000) - NET_C(RC1.1, GND) - NET_C(RC1.2, Q1.C) - NET_C(RB1.1, clk) - NET_C(RB1.2, Q1.B) - NET_C(Q1.E, V3) + NET_C(RC1.1, GND) + NET_C(RC1.2, Q1.C) + NET_C(RB1.1, clk) + NET_C(RB1.2, Q1.B) + NET_C(Q1.E, V3) - LOG(logB, Q.B) - LOG(logC, Q.C) + LOG(logB, Q.B) + LOG(logC, Q.C) NETLIST_END() diff --git a/src/lib/netlist/examples/bjt_eb.c b/src/lib/netlist/examples/bjt_eb.c index f21735c36ec..a42def2df3b 100644 --- a/src/lib/netlist/examples/bjt_eb.c +++ b/src/lib/netlist/examples/bjt_eb.c @@ -10,35 +10,35 @@ #include "netlist/analog/nld_twoterm.h" NETLIST_START(bjt) - /* Standard stuff */ + /* Standard stuff */ - CLOCK(clk, 10000) // 10000 Hz - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-6) - PARAM(Solver.RESCHED_LOOPS, 30) - ANALOG_INPUT(V5, 5) - ANALOG_INPUT(V3, 3.5) + CLOCK(clk, 10000) // 10000 Hz + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-6) + PARAM(Solver.RESCHED_LOOPS, 30) + ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V3, 3.5) - /* NPN - example */ + /* NPN - example */ - QBJT_EB(Q, "BC237B") - RES(RB, 1000) - RES(RC, 1000) + QBJT_EB(Q, "BC237B") + RES(RB, 1000) + RES(RC, 1000) - NET_C(RC.1, V5) - NET_C(RC.2, Q.C) - NET_C(RB.1, clk) - //NET_C(RB.1, V3) - NET_C(RB.2, Q.B) - NET_C(Q.E, GND) + NET_C(RC.1, V5) + NET_C(RC.2, Q.C) + NET_C(RB.1, clk) + //NET_C(RB.1, V3) + NET_C(RB.2, Q.B) + NET_C(Q.E, GND) - // put some load on Q.C + // put some load on Q.C - RES(RCE, 150000) - NET_C(RCE.1, Q.C) - NET_C(RCE.2, GND) + RES(RCE, 150000) + NET_C(RCE.1, Q.C) + NET_C(RCE.2, GND) - //LOG(logB, Q.B) - //LOG(logC, Q.C) + //LOG(logB, Q.B) + //LOG(logC, Q.C) NETLIST_END() diff --git a/src/lib/netlist/examples/bjt_eb_pnp.c b/src/lib/netlist/examples/bjt_eb_pnp.c index 10169b6bd3f..7ca43466300 100644 --- a/src/lib/netlist/examples/bjt_eb_pnp.c +++ b/src/lib/netlist/examples/bjt_eb_pnp.c @@ -9,27 +9,27 @@ #include "netlist/devices/net_lib.h" NETLIST_START(bjt) - /* Standard stuff */ + /* Standard stuff */ - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) - ANALOG_INPUT(V3, 3.5) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) + ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V3, 3.5) - /* PNP - example */ + /* PNP - example */ - QBJT_EB(Q1, "BC556B") - RES(RB1, 1000) - RES(RC1, 1000) + QBJT_EB(Q1, "BC556B") + RES(RB1, 1000) + RES(RC1, 1000) - NET_C(RC1.1, GND) - NET_C(RC1.2, Q1.C) - NET_C(RB1.1, clk) - NET_C(RB1.2, Q1.B) - NET_C(Q1.E, V3) + NET_C(RC1.1, GND) + NET_C(RC1.2, Q1.C) + NET_C(RB1.1, clk) + NET_C(RB1.2, Q1.B) + NET_C(Q1.E, V3) - LOG(logA, clk) - LOG(logB, Q1.B) - LOG(logC, Q1.C) + LOG(logA, clk) + LOG(logB, Q1.B) + LOG(logC, Q1.C) NETLIST_END() diff --git a/src/lib/netlist/examples/breakout.c b/src/lib/netlist/examples/breakout.c index 591ffaf3414..c5919af5e5a 100644 --- a/src/lib/netlist/examples/breakout.c +++ b/src/lib/netlist/examples/breakout.c @@ -9,45 +9,45 @@ //2 555 timers static Astable555Desc b2_555_desc(OHM(560.0), M_OHM(1.8), U_FARAD(0.1)); -static Mono555Desc c9_555_desc(OHM(47.0), U_FARAD(1.0)); // R33, C21 +static Mono555Desc c9_555_desc(OHM(47.0), U_FARAD(1.0)); // R33, C21 //check these values //static Paddle1HorizontalDesc pad1_desc(15047.0, 47.0, &c9_555_desc); static CapacitorDesc c32_desc(U_FARAD(0.1)); -static CapacitorDesc c36_desc(N_FARAD(1.0)); //0.001uF = 1nF +static CapacitorDesc c36_desc(N_FARAD(1.0)); //0.001uF = 1nF static CapacitorDesc c37_desc(P_FARAD(330.0)); static BufferDesc pad_en_buf_desc(DELAY_NS(15.0), DELAY_NS(15.0)); // Prevents 12ns glitch on PAD_EN_n signal from resetting C9. TODO: is this accurate? #if 0 static VIDEO_DESC( breakout ) - VIDEO_RESISTANCE(1, K_OHM(0.0)) - VIDEO_RESISTANCE(2, K_OHM(3.9)) - VIDEO_RESISTANCE(3, K_OHM(3.9)) - VIDEO_RESISTANCE(4, K_OHM(3.9)) - VIDEO_RESISTANCE(5, K_OHM(3.9)) - VIDEO_RESISTANCE(6, K_OHM(3.9)) - //VIDEO_RESISTANCE(Video::HBLANK_PIN, K_OHM(0.0)) - VIDEO_ORIENTATION(ROTATE_90) - VIDEO_CONTRAST(4.0) - - // Values guessed based on screenshots. TODO: Make more accurate - // X, Y, W, H, R, G, B - VIDEO_OVERLAY( 15.570e-6, 0.0, 1.911e-6, -1.0, 0.80, 0.15, 0.05 ) // Red Bricks - VIDEO_OVERLAY( 17.481e-6, 0.0, 1.956e-6, -1.0, 0.95, 0.65, 0.05 ) // Amber Bricks - VIDEO_OVERLAY( 19.437e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.25 ) // Green Bricks - VIDEO_OVERLAY( 21.393e-6, 0.0, 1.955e-6, -1.0, 0.95, 0.95, 0.20 ) // Yellow Bricks - VIDEO_OVERLAY( 51.345e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.95 ) // Blue Paddle - - // TODO: Different overlays for cocktail cabinet + VIDEO_RESISTANCE(1, K_OHM(0.0)) + VIDEO_RESISTANCE(2, K_OHM(3.9)) + VIDEO_RESISTANCE(3, K_OHM(3.9)) + VIDEO_RESISTANCE(4, K_OHM(3.9)) + VIDEO_RESISTANCE(5, K_OHM(3.9)) + VIDEO_RESISTANCE(6, K_OHM(3.9)) + //VIDEO_RESISTANCE(Video::HBLANK_PIN, K_OHM(0.0)) + VIDEO_ORIENTATION(ROTATE_90) + VIDEO_CONTRAST(4.0) + + // Values guessed based on screenshots. TODO: Make more accurate + // X, Y, W, H, R, G, B + VIDEO_OVERLAY( 15.570e-6, 0.0, 1.911e-6, -1.0, 0.80, 0.15, 0.05 ) // Red Bricks + VIDEO_OVERLAY( 17.481e-6, 0.0, 1.956e-6, -1.0, 0.95, 0.65, 0.05 ) // Amber Bricks + VIDEO_OVERLAY( 19.437e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.25 ) // Green Bricks + VIDEO_OVERLAY( 21.393e-6, 0.0, 1.955e-6, -1.0, 0.95, 0.95, 0.20 ) // Yellow Bricks + VIDEO_OVERLAY( 51.345e-6, 0.0, 1.956e-6, -1.0, 0.05, 0.65, 0.95 ) // Blue Paddle + + // TODO: Different overlays for cocktail cabinet VIDEO_DESC_END static AUDIO_DESC( breakout ) - AUDIO_RESISTANCE(1, K_OHM(47.0)) - AUDIO_RESISTANCE(2, K_OHM(47.0)) - AUDIO_RESISTANCE(3, K_OHM(47.0)) - AUDIO_RESISTANCE(4, K_OHM(47.0)) - AUDIO_GAIN(3.0) + AUDIO_RESISTANCE(1, K_OHM(47.0)) + AUDIO_RESISTANCE(2, K_OHM(47.0)) + AUDIO_RESISTANCE(3, K_OHM(47.0)) + AUDIO_RESISTANCE(4, K_OHM(47.0)) + AUDIO_GAIN(3.0) VIDEO_DESC_END #endif @@ -63,26 +63,26 @@ static Dipswitch53137Desc dipswitch1_desc("bonus_credit", "Bonus Credit", 3, "No //static DipswitchDesc dipswitch4_desc("ball_count", "Ball Count", 0, "3", "5"); CIRCUIT_LAYOUT( breakout ) - CHIP("S1", 53137, &dipswitch1_desc) + CHIP("S1", 53137, &dipswitch1_desc) CHIP("S2", DIPSWITCH, &dipswitch2_desc) CHIP("S3", DIPSWITCH, &dipswitch3_desc) CHIP("S4", DIPSWITCH, &dipswitch4_desc) - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-7) // works and is sufficient - //CHIP("CLOCK", CLOCK_14_318_MHZ) - MAINCLOCK(Y1, 14318000.0) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-7) // works and is sufficient + //CHIP("CLOCK", CLOCK_14_318_MHZ) + MAINCLOCK(Y1, 14318000.0) - ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V5, 5) #define VCC "V5", Q #define GND "GND", Q - //CHIP("Y1", CLOCK_14_318_MHZ) //Y1 + //CHIP("Y1", CLOCK_14_318_MHZ) //Y1 CHIP_CAPACITOR(C32, &c32_desc) CHIP_CAPACITOR(C36, &c36_desc) - CHIP_CAPACITOR(C37, &c37_desc) - CHIP("PAD_EN_BUF", BUFFER, &pad_en_buf_desc) + CHIP_CAPACITOR(C37, &c37_desc) + CHIP("PAD_EN_BUF", BUFFER, &pad_en_buf_desc) CHIP("A3", 7474) CHIP("A4", 7408) @@ -91,7 +91,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP_9602_Mono(A7, &a7_desc) CHIP_9602_Mono(A8, &a8_desc) - CHIP_555_Astable(B2, &b2_555_desc) + CHIP_555_Astable(B2, &b2_555_desc) CHIP("B3", 7402) CHIP("B4", 9316) CHIP("B5", 74193) @@ -107,7 +107,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("C6", 7486) CHIP("C7", 9316) CHIP("C8", 9316) - CHIP_555_Mono(C9, &c9_555_desc) + CHIP_555_Mono(C9, &c9_555_desc) CHIP("D2", 7432) CHIP("D3", 7474) @@ -116,7 +116,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("D6", 7408) CHIP("D7", 7411) CHIP("D8", 7400) -// CHIP("D9", 4016) //quad bilateral switch +// CHIP("D9", 4016) //quad bilateral switch CHIP("E1", 7404) CHIP("E2", 7486) @@ -144,7 +144,7 @@ CIRCUIT_LAYOUT( breakout ) CHIP("H4", 7400) CHIP("H5", 9312) CHIP("H6", 9310) - CHIP("H7", 7408) //sometimes looks like N7 on schematic + CHIP("H7", 7408) //sometimes looks like N7 on schematic CHIP("H8", 7474) CHIP("H9", 7474) @@ -165,18 +165,18 @@ CIRCUIT_LAYOUT( breakout ) CHIP("K5", 9312) CHIP("K6", 9310) CHIP("K7", 7486) - CHIP("K8", 7474) //TODO: one more than bom? + CHIP("K8", 7474) //TODO: one more than bom? CHIP("K9", 74107) CHIP("L1", 9316) CHIP("L2", 7486) - CHIP("L3", 82S16) //RAM + CHIP("L3", 82S16) //RAM CHIP("L4", 7411) CHIP("L5", 9312) CHIP("L6", 9310) CHIP("L7", 7486) CHIP("L8", 74193) - CHIP("L9", 7400) //TODO: 1 more chip than on bom? + CHIP("L9", 7400) //TODO: 1 more chip than on bom? CHIP("M1", 9316) CHIP("M2", 7483) @@ -193,232 +193,232 @@ CIRCUIT_LAYOUT( breakout ) CHIP("N4", 7411) CHIP("N5", 9312) CHIP("N6", 9310) - CHIP("N7", 7408) //sometimes looks like H7 on schematic + CHIP("N7", 7408) //sometimes looks like H7 on schematic CHIP_9602_Mono(N8, &n8_desc) CHIP("N9", 74192) - //LM380 //speaker amplifier - //LM323 //regulator + //LM380 //speaker amplifier + //LM323 //regulator // CHIP("CREDIT_LIGHT1", LAMP) // CHIP("CREDIT_LIGHT2", LAMP) // CHIP("SERVE_LIGHT", LAMP) - CHIP("PAD1", PADDLE1_HORIZONTAL_INPUT, &pad1_desc) - PADDLE_CONNECTION("PAD1", "C9") + CHIP("PAD1", PADDLE1_HORIZONTAL_INPUT, &pad1_desc) + PADDLE_CONNECTION("PAD1", "C9") - CHIP_LATCH(LATCH) - CHIP("COIN1", COIN_INPUT) + CHIP_LATCH(LATCH) + CHIP("COIN1", COIN_INPUT) - //CHIP("COIN2", COIN_INPUT) + //CHIP("COIN2", COIN_INPUT) - CHIP("START", START_INPUT) + CHIP("START", START_INPUT) - CHIP("SERVE", BUTTONS1_INPUT) + CHIP("SERVE", BUTTONS1_INPUT) - //TODO: coin2 and start 2 + //TODO: coin2 and start 2 - VIDEO(breakout) - AUDIO(breakout) + VIDEO(breakout) + AUDIO(breakout) #ifdef DEBUG CHIP("LOG1", VCD_LOG, &vcd_log_desc) #endif //HSYNC and VSYNC - #define H1_d "L1", 14 - #define H2_d "L1", 13 - #define H4_d "L1", 12 - #define H8_d "L1", 11 - #define H8_n "J2", 2 - #define H16_d "K1", 14 - #define H16_n "J2", 6 - #define H32_d "K1", 13 - #define H32_n "J2", 4 - #define H64_d "K1", 12 - #define H128_d "K1", 11 - - #define V1_d "M1", 14 - #define V2_d "M1", 13 - #define V4_d "M1", 12 - #define V8_d "M1", 11 - #define V16_d "N1", 14 - #define V16_n "J2", 10 - #define V32_d "N1", 13 - #define V64_d "N1", 12 - #define V64I "H7", 11 - #define V64_n "M9", 10 - #define V128_d "N1", 11 - - #define H1 "L2", 8 - #define H2 "L2", 11 - #define H4 "L2", 3 - #define H8 "L2", 6 - #define H16 "K2", 8 - #define H32 "K2", 11 - #define H64 "K2", 3 - #define H128 "K2", 6 + #define H1_d "L1", 14 + #define H2_d "L1", 13 + #define H4_d "L1", 12 + #define H8_d "L1", 11 + #define H8_n "J2", 2 + #define H16_d "K1", 14 + #define H16_n "J2", 6 + #define H32_d "K1", 13 + #define H32_n "J2", 4 + #define H64_d "K1", 12 + #define H128_d "K1", 11 + + #define V1_d "M1", 14 + #define V2_d "M1", 13 + #define V4_d "M1", 12 + #define V8_d "M1", 11 + #define V16_d "N1", 14 + #define V16_n "J2", 10 + #define V32_d "N1", 13 + #define V64_d "N1", 12 + #define V64I "H7", 11 + #define V64_n "M9", 10 + #define V128_d "N1", 11 + + #define H1 "L2", 8 + #define H2 "L2", 11 + #define H4 "L2", 3 + #define H8 "L2", 6 + #define H16 "K2", 8 + #define H32 "K2", 11 + #define H64 "K2", 3 + #define H128 "K2", 6 //#define V1 - #define V2 "M3", 3 - #define V4 "M3", 6 - #define V8 "M3", 11 - #define V16 "N3", 8 - #define V32 "N3", 3 - #define V64 "N3", 6 - #define V128 "N3", 11 - - #define HSYNC "J1", 2 - #define HSYNC_n "J1", 3 - #define VSYNC "J1", 7 - #define VSYNC_n "J1", 6 - #define PSYNC "J1", 11 - #define PSYNC_n "J1", 10 - #define BSYNC "J1", 15 - #define BSYNC_n "J1", 14 - - #define BALL "D7", 6 + #define V2 "M3", 3 + #define V4 "M3", 6 + #define V8 "M3", 11 + #define V16 "N3", 8 + #define V32 "N3", 3 + #define V64 "N3", 6 + #define V128 "N3", 11 + + #define HSYNC "J1", 2 + #define HSYNC_n "J1", 3 + #define VSYNC "J1", 7 + #define VSYNC_n "J1", 6 + #define PSYNC "J1", 11 + #define PSYNC_n "J1", 10 + #define BSYNC "J1", 15 + #define BSYNC_n "J1", 14 + + #define BALL "D7", 6 #define BALL_DISPLAY "A4", 6 - #define PLAYFIELD "H4", 3 - #define SCORE "D3", 5 - #define VERT_TRIG_n "H1", 8 + #define PLAYFIELD "H4", 3 + #define SCORE "D3", 5 + #define VERT_TRIG_n "H1", 8 - #define CLOCK "H1", 11 - #define SCLOCK "K1", 15 - #define CKBH "F1", 13 + #define CLOCK "H1", 11 + #define SCLOCK "K1", 15 + #define CKBH "F1", 13 - #define PAD_n "K3", 8 - #define PAD_EN_n "C2", 8 + #define PAD_n "K3", 8 + #define PAD_EN_n "C2", 8 //#define P VCC #define P "V5", Q - #define COIN "L9", 6 - #define COIN1_n "F8", 5 - #define COIN2_n "H9", 5 - #define CREDIT_1_OR_2 "L9", 3 - #define CREDIT_1_OR_2_n "F9", 8 - #define CREDIT2 "F9", 6 - #define CREDIT2_n "M8", 8 - #define CR_START1 "E8", 5 - #define CR_START1_n "E8", 6 //Schematic shows E8.6 as positive CR_START1, but this can't be right? - #define CR_START2 "E8", 9 - #define CR_START2_n "E8", 8 - #define CSW1 "F9", 12 - #define CSW2 "F9", 2 - - #define P2_CONDITIONAL "H1", 3 - #define P2_CONDITIONAL_dash "H7", 8 - #define PLAYER_2 "B4", 14 - #define PLAYER_2_n "M9", 8 - - #define START_GAME "D8", 6 - #define START_GAME1_n "M9", 4 - #define START_GAME_n "M9", 6 - - #define BG1_n "K8", 9 - #define BG1 "K8", 8 - #define BG2_n "K8", 5 - #define BG2 "K8", 6 - - #define FREE_GAME_TONE "N7", 3 - #define BONUS_COIN "L9", 11 + #define COIN "L9", 6 + #define COIN1_n "F8", 5 + #define COIN2_n "H9", 5 + #define CREDIT_1_OR_2 "L9", 3 + #define CREDIT_1_OR_2_n "F9", 8 + #define CREDIT2 "F9", 6 + #define CREDIT2_n "M8", 8 + #define CR_START1 "E8", 5 + #define CR_START1_n "E8", 6 //Schematic shows E8.6 as positive CR_START1, but this can't be right? + #define CR_START2 "E8", 9 + #define CR_START2_n "E8", 8 + #define CSW1 "F9", 12 + #define CSW2 "F9", 2 + + #define P2_CONDITIONAL "H1", 3 + #define P2_CONDITIONAL_dash "H7", 8 + #define PLAYER_2 "B4", 14 + #define PLAYER_2_n "M9", 8 + + #define START_GAME "D8", 6 + #define START_GAME1_n "M9", 4 + #define START_GAME_n "M9", 6 + + #define BG1_n "K8", 9 + #define BG1 "K8", 8 + #define BG2_n "K8", 5 + #define BG2 "K8", 6 + + #define FREE_GAME_TONE "N7", 3 + #define BONUS_COIN "L9", 11 //#define Q "E9", 6 - #define LAT_Q "E9", 6 - #define Q_n "LATCH", 3 - #define SBD_n "D2", 11 + #define LAT_Q "E9", 6 + #define Q_n "LATCH", 3 + #define SBD_n "D2", 11 - #define PLAY_CP "D2", 8 - #define PLGM2_n "F7", 7 - #define VB_HIT_n "A5", 6 + #define PLAY_CP "D2", 8 + #define PLGM2_n "F7", 7 + #define VB_HIT_n "A5", 6 - #define SERVE_n "SERVE", 1 - #define SERVE_WAIT "A3", 9 + #define SERVE_n "SERVE", 1 + #define SERVE_WAIT "A3", 9 #define SERVE_WAIT_n "A3", 8 - #define BRICK_DISPLAY "E3", 1 - #define BRICK_HIT "E6", 5 - #define BRICK_HIT_n "E6", 6 - - //#define EGL "A4", 3 - #define EGL "C37" , 2 - #define EGL_n "C5", 2 - - #define RAM_PLAYER1 "E7", 4 - #define A1 "H6", 14 - #define B1 "H6", 13 - #define C1 "H6", 12 - #define D1 "H6", 11 - #define E1 "J6", 14 - #define F1 "J6", 13 - #define G1 "J6", 12 - #define H01 "J6", 11 - #define I1 "K6", 14 - #define J1 "K6", 13 - #define K1 "K6", 12 - #define L1 "K6", 11 - #define A2 "N6", 14 - #define B2 "N6", 13 - #define C2 "N6", 12 - #define D2 "N6", 11 - #define E2 "M6", 14 - #define F2 "M6", 13 - #define G2 "M6", 12 - #define H02 "M6", 11 //TODO: better name for these signals - #define I2 "L6", 14 - #define J2 "L6", 13 - #define K2 "L6", 12 - #define L2 "L6", 11 - - #define CX0 "C6", 11 - #define CX1 "C6", 6 - #define X0 "C5", 10 - #define X1 "B6", 3 - #define X2 "C6", 3 - #define Y0 "B6", 11 - #define Y1 "B6", 6 - #define Y2 "A6", 6 - #define DN "C4", 3 - #define PC "D4", 12 - #define PD "D4", 11 - #define SU_n "D5", 8 - #define V_SLOW "C5", 8 - - #define PLNR "E3", 4 - #define SCI_n "H4", 6 - #define SFL_n "E9", 12 //score flash - #define TOP_n "E9", 2 - - #define BP_HIT_n "A5", 8 - #define BTB_HIT_n "C3", 3 - - #define SET_BRICKS "D3", 9 + #define BRICK_DISPLAY "E3", 1 + #define BRICK_HIT "E6", 5 + #define BRICK_HIT_n "E6", 6 + + //#define EGL "A4", 3 + #define EGL "C37" , 2 + #define EGL_n "C5", 2 + + #define RAM_PLAYER1 "E7", 4 + #define A1 "H6", 14 + #define B1 "H6", 13 + #define C1 "H6", 12 + #define D1 "H6", 11 + #define E1 "J6", 14 + #define F1 "J6", 13 + #define G1 "J6", 12 + #define H01 "J6", 11 + #define I1 "K6", 14 + #define J1 "K6", 13 + #define K1 "K6", 12 + #define L1 "K6", 11 + #define A2 "N6", 14 + #define B2 "N6", 13 + #define C2 "N6", 12 + #define D2 "N6", 11 + #define E2 "M6", 14 + #define F2 "M6", 13 + #define G2 "M6", 12 + #define H02 "M6", 11 //TODO: better name for these signals + #define I2 "L6", 14 + #define J2 "L6", 13 + #define K2 "L6", 12 + #define L2 "L6", 11 + + #define CX0 "C6", 11 + #define CX1 "C6", 6 + #define X0 "C5", 10 + #define X1 "B6", 3 + #define X2 "C6", 3 + #define Y0 "B6", 11 + #define Y1 "B6", 6 + #define Y2 "A6", 6 + #define DN "C4", 3 + #define PC "D4", 12 + #define PD "D4", 11 + #define SU_n "D5", 8 + #define V_SLOW "C5", 8 + + #define PLNR "E3", 4 + #define SCI_n "H4", 6 + #define SFL_n "E9", 12 //score flash + #define TOP_n "E9", 2 + + #define BP_HIT_n "A5", 8 + #define BTB_HIT_n "C3", 3 + + #define SET_BRICKS "D3", 9 #define SET_BRICKS_n "D3", 8 - #define BALL_A "B4", 13 - #define BALL_B "B4", 12 - #define BALL_C "B4", 11 + #define BALL_A "B4", 13 + #define BALL_B "B4", 12 + #define BALL_C "B4", 11 - #define FPD1 "F3", 10 - #define FPD1_n "F3", 9 - #define FPD2 "F3", 6 - #define FPD2_n "F3", 7 + #define FPD1 "F3", 10 + #define FPD1_n "F3", 9 + #define FPD2 "F3", 6 + #define FPD2_n "F3", 7 - #define COUNT "N7", 11 - #define COUNT_1 "N7", 8 - #define COUNT_2 "N7", 6 + #define COUNT "N7", 11 + #define COUNT_1 "N7", 8 + #define COUNT_2 "N7", 6 - #define ATTRACT "E6", 8 - #define ATTRACT_n "E6", 9 + #define ATTRACT "E6", 8 + #define ATTRACT_n "E6", 9 - #define BRICK_SOUND "B8", 14 - #define P_HIT_SOUND "B7", 12 + #define BRICK_SOUND "B8", 14 + #define P_HIT_SOUND "B7", 12 #define VB_HIT_SOUND "B7", 11 - #define LH_SIDE "J3", 13 - #define RH_SIDE "H2", 3 - #define TOP_BOUND "K4", 6 + #define LH_SIDE "J3", 13 + #define RH_SIDE "H2", 3 + #define TOP_BOUND "K4", 6 // CONNECTION(CREDIT_1_OR_2, "CREDIT_LIGHT1", 1) // CONNECTION(CREDIT2, "CREDIT_LIGHT2", 1) @@ -1065,7 +1065,7 @@ CIRCUIT_LAYOUT( breakout ) //COIN2 circuit //CONNECTION("COIN2", 1, "F9", 1) - CONNECTION(GND, "F9", 1) //TODO: coin2 not implemented + CONNECTION(GND, "F9", 1) //TODO: coin2 not implemented CONNECTION(CSW2, "F9", 3) CONNECTION(CSW2, "H9", 10) @@ -1132,10 +1132,10 @@ CIRCUIT_LAYOUT( breakout ) //TODO: hows this whole latch stuff work? what about Q_n going to COIN1_n and COIN2_n CONNECTION(CREDIT_1_OR_2_n, "D8", 13) CONNECTION(EGL, "D8", 12) - CONNECTION("LATCH", 1, "D8", 11) //set - CONNECTION("LATCH", 2, COIN1_n) //reset - //CONNECTION("LATCH", 3, COIN2_n) //set //TODO: coin2 here - CONNECTION( "LATCH", 3, "E9", 5) //output + CONNECTION("LATCH", 1, "D8", 11) //set + CONNECTION("LATCH", 2, COIN1_n) //reset + //CONNECTION("LATCH", 3, COIN2_n) //set //TODO: coin2 here + CONNECTION( "LATCH", 3, "E9", 5) //output CONNECTION(LAT_Q, "D6", 1) @@ -1441,21 +1441,21 @@ CIRCUIT_LAYOUT( breakout ) #ifdef DEBUG - // RAM access - /*CONNECTION("LOG1", 3, H4) //A - CONNECTION("LOG1", 4, H8) //B - CONNECTION("LOG1", 5, H16) //C - CONNECTION("LOG1", 6, V32) //D - CONNECTION("LOG1", 7, V64) //E - CONNECTION("LOG1", 8, V128) //F - CONNECTION("LOG1", 9, V16) //G - CONNECTION("LOG1", 10, RAM_PLAYER1) //H - CONNECTION("LOG1", 11, H32) //I - CONNECTION("LOG1", 12, H128) //J - CONNECTION("LOG1", 13, "H4", 8) //K - CONNECTION("LOG1", 14, "E1", 4) //L - CONNECTION("LOG1", 15, "F2", 12) //M - CONNECTION("LOG1", 16, "L3", 6)*/ //N + // RAM access + /*CONNECTION("LOG1", 3, H4) //A + CONNECTION("LOG1", 4, H8) //B + CONNECTION("LOG1", 5, H16) //C + CONNECTION("LOG1", 6, V32) //D + CONNECTION("LOG1", 7, V64) //E + CONNECTION("LOG1", 8, V128) //F + CONNECTION("LOG1", 9, V16) //G + CONNECTION("LOG1", 10, RAM_PLAYER1) //H + CONNECTION("LOG1", 11, H32) //I + CONNECTION("LOG1", 12, H128) //J + CONNECTION("LOG1", 13, "H4", 8) //K + CONNECTION("LOG1", 14, "E1", 4) //L + CONNECTION("LOG1", 15, "F2", 12) //M + CONNECTION("LOG1", 16, "L3", 6)*/ //N #endif CIRCUIT_LAYOUT_END diff --git a/src/lib/netlist/examples/cccs.c b/src/lib/netlist/examples/cccs.c index a1244677d20..2c7833b19f3 100644 --- a/src/lib/netlist/examples/cccs.c +++ b/src/lib/netlist/examples/cccs.c @@ -10,24 +10,24 @@ NETLIST_START(cccs) - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-12) - PARAM(Solver.METHOD, "MAT_CR") + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-12) + PARAM(Solver.METHOD, "MAT_CR") - CCCS(VV) - PARAM(VV.G, 1) - PARAM(VV.RI, 1e-3) + CCCS(VV) + PARAM(VV.G, 1) + PARAM(VV.RI, 1e-3) RES(R2, 1000) RES(R1, 1000) - NET_C(clk, VV.IP) - NET_C(VV.IN, R1.1) + NET_C(clk, VV.IP) + NET_C(VV.IN, R1.1) NET_C(R1.2, GND) - NET_C(R2.1, VV.OP) - NET_C(R2.2, GND) - NET_C(VV.ON, GND) + NET_C(R2.1, VV.OP) + NET_C(R2.2, GND) + NET_C(VV.ON, GND) /* Simple current source */ diff --git a/src/lib/netlist/examples/cd4066.c b/src/lib/netlist/examples/cd4066.c index c77e6438c0f..1917c1909fc 100644 --- a/src/lib/netlist/examples/cd4066.c +++ b/src/lib/netlist/examples/cd4066.c @@ -9,38 +9,38 @@ #include "netlist/devices/net_lib.h" NETLIST_START(cd4066) - /* Standard stuff */ + /* Standard stuff */ - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48000) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V5, 5) - CD_4066_DIP(SW) - RES(R1, 1000) + CD_4066_DIP(SW) + RES(R1, 1000) - NET_C(SW.7, GND) - NET_C(SW.14, V5) + NET_C(SW.7, GND) + NET_C(SW.14, V5) - NET_C(SW.13, clk) - NET_C(SW.1, V5) + NET_C(SW.13, clk) + NET_C(SW.1, V5) - NET_C(SW.2, R1.1) - NET_C(R1.2, GND) + NET_C(SW.2, R1.1) + NET_C(R1.2, GND) - // ground anything else + // ground anything else - NET_C(SW.3, GND) - NET_C(SW.4, GND) - NET_C(SW.5, GND) - NET_C(SW.6, GND) - NET_C(SW.8, GND) - NET_C(SW.9, GND) - NET_C(SW.10, GND) - NET_C(SW.11, GND) - NET_C(SW.12, GND) + NET_C(SW.3, GND) + NET_C(SW.4, GND) + NET_C(SW.5, GND) + NET_C(SW.6, GND) + NET_C(SW.8, GND) + NET_C(SW.9, GND) + NET_C(SW.10, GND) + NET_C(SW.11, GND) + NET_C(SW.12, GND) - LOG(logB, clk) - LOG(logC, R1.1) + LOG(logB, clk) + LOG(logC, R1.1) NETLIST_END() diff --git a/src/lib/netlist/examples/cdelay.c b/src/lib/netlist/examples/cdelay.c index 5f4f8d04440..273a9fcfab7 100644 --- a/src/lib/netlist/examples/cdelay.c +++ b/src/lib/netlist/examples/cdelay.c @@ -9,11 +9,11 @@ NETLIST_START(perf) - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-20) - MAINCLOCK(clk, 50000000) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-20) + MAINCLOCK(clk, 50000000) - TTL_7400_NAND(n1,clk,clk) + TTL_7400_NAND(n1,clk,clk) NETLIST_END() @@ -27,27 +27,27 @@ NETLIST_END() NETLIST_START(cap_delay) - /* - * delay circuit - * - */ + /* + * delay circuit + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, P_FREQ) - PARAM(Solver.ACCURACY, 1e-20) + SOLVER(Solver, P_FREQ) + PARAM(Solver.ACCURACY, 1e-20) PARAM(Solver.DYNAMIC_TS, P_DTS) PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 1e-6) - CLOCK(clk, 5000) + CLOCK(clk, 5000) - TTL_7400_NAND(n1,clk,clk) - CAP(C, 1e-6) - NET_C(n1.Q, C.2) - NET_C(GND, C.1) - TTL_7400_NAND(n2,n1.Q, n1.Q) + TTL_7400_NAND(n1,clk,clk) + CAP(C, 1e-6) + NET_C(n1.Q, C.2) + NET_C(GND, C.1) + TTL_7400_NAND(n2,n1.Q, n1.Q) - LOG(logclk, clk) - LOG(logn1Q, C.2) - LOG(logn2Q, n1.Q) + LOG(logclk, clk) + LOG(logn1Q, C.2) + LOG(logn2Q, n1.Q) NETLIST_END() diff --git a/src/lib/netlist/examples/cmos_inverter.cpp b/src/lib/netlist/examples/cmos_inverter.cpp index e0936bfd3bc..02ea330cb77 100644 --- a/src/lib/netlist/examples/cmos_inverter.cpp +++ b/src/lib/netlist/examples/cmos_inverter.cpp @@ -10,19 +10,19 @@ #include "netlist/analog/nld_twoterm.h" NETLIST_START(cmos_inverter) - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-7) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-7) PARAM(Solver.NR_LOOPS, 5000) PARAM(Solver.METHOD, "MAT_CR") - ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V5, 5) VS(IN, 5) PARAM(IN.FUNC, "T 5 *") - MOSFET(P, "PMOS(VTO=-1.0 KP=2e-3 LAMBDA=2E-2)") - MOSFET(M, "NMOS(VTO=1.0 KP=2e-3 LAMBDA=2E-2)") + MOSFET(P, "PMOS(VTO=-1.0 KP=2e-3 LAMBDA=2E-2)") + MOSFET(M, "NMOS(VTO=1.0 KP=2e-3 LAMBDA=2E-2)") NET_C(P.S, V5) NET_C(P.D, M.D) @@ -36,7 +36,7 @@ NETLIST_START(cmos_inverter) NET_C(M.D, C.1) NET_C(M.S, C.2) #endif - LOG(log_G, M.G) - LOG(log_D, M.D) + LOG(log_G, M.G) + LOG(log_D, M.D) NETLIST_END() diff --git a/src/lib/netlist/examples/cmos_inverter_clk.cpp b/src/lib/netlist/examples/cmos_inverter_clk.cpp index 8b70c46e715..32dbb25a33b 100644 --- a/src/lib/netlist/examples/cmos_inverter_clk.cpp +++ b/src/lib/netlist/examples/cmos_inverter_clk.cpp @@ -12,19 +12,19 @@ #define USE_CLOCK (1) NETLIST_START(cmos_inverter_clk) - /* Standard stuff */ + /* Standard stuff */ //SOLVER(Solver, 480000) SOLVER(Solver, 1e5) //SOLVER(Solver, 100000000000) - PARAM(Solver.ACCURACY, 1e-6 ) + PARAM(Solver.ACCURACY, 1e-6 ) PARAM(Solver.NR_LOOPS, 500000) PARAM(Solver.DYNAMIC_TS, 1) PARAM(Solver.DYNAMIC_LTE, 1e-5) PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 2e-9) - ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V5, 5) -// CLOCK(clk, 0.5e6) +// CLOCK(clk, 0.5e6) #if (USE_CLOCK) CLOCK(V, 5000) @@ -35,8 +35,8 @@ NETLIST_START(cmos_inverter_clk) PARAM(V.FUNC, "T * 5e6") #endif - MOSFET(P, "PMOS(VTO=-0.5 GAMMA=0.5 TOX=20n)") - MOSFET(M, "NMOS(VTO=0.5 GAMMA=0.5 TOX=20n)") + MOSFET(P, "PMOS(VTO=-0.5 GAMMA=0.5 TOX=20n)") + MOSFET(M, "NMOS(VTO=0.5 GAMMA=0.5 TOX=20n)") RES(RG, 1) NET_C(P.S, V5) @@ -57,8 +57,8 @@ NETLIST_START(cmos_inverter_clk) NET_C(M.S, C.2) #endif #if 1 - LOG(log_G, M.G) - LOG(log_D, M.D) + LOG(log_G, M.G) + LOG(log_D, M.D) LOGD(log_X, RG.1, RG.2) #endif NETLIST_END() diff --git a/src/lib/netlist/examples/congo_bongo.c b/src/lib/netlist/examples/congo_bongo.c index 3ad52e7dced..9c5db529d6c 100644 --- a/src/lib/netlist/examples/congo_bongo.c +++ b/src/lib/netlist/examples/congo_bongo.c @@ -10,8 +10,8 @@ /* set to 1 to use optimizations increasing performance significantly */ -#define USE_OPTMIZATIONS 1 -#define USE_FRONTIERS 1 +#define USE_OPTMIZATIONS 1 +#define USE_FRONTIERS 1 /* ---------------------------------------------------------------------------- * Library section header START @@ -19,7 +19,7 @@ #ifndef __PLIB_PREPROCESSOR__ -#define LM358_DIP(_name) \ +#define LM358_DIP(_name) \ NET_REGISTER_DEV_X(LM358_DIP, _name) #define G501534_DIP(_name) \ @@ -391,8 +391,8 @@ NETLIST_START(G501534_DIP) * 12: VCC * 4: GND * 1: IN - * 3: OUT - * 13: CV + * 3: OUT + * 13: CV * 2: RDL - connected via Capacitor to ground */ diff --git a/src/lib/netlist/examples/cs.cpp b/src/lib/netlist/examples/cs.cpp index 8229c5bc032..f9b9741e0ff 100644 --- a/src/lib/netlist/examples/cs.cpp +++ b/src/lib/netlist/examples/cs.cpp @@ -10,14 +10,14 @@ NETLIST_START(cs) - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-12) - PARAM(Solver.METHOD, "MAT_CR") + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-12) + PARAM(Solver.METHOD, "MAT_CR") /* Positive current flows into pin 1 of the current source * Thus we observe a negative voltage on R1.1 ! */ - CS(CS1, 1e-3) + CS(CS1, 1e-3) RES(R1, 1000) NET_C(CS1.1, R1.1) diff --git a/src/lib/netlist/examples/diode.c b/src/lib/netlist/examples/diode.c index 9a2196c6f24..b628a18af4a 100644 --- a/src/lib/netlist/examples/diode.c +++ b/src/lib/netlist/examples/diode.c @@ -7,25 +7,25 @@ #include "netlist/devices/net_lib.h" NETLIST_START(diode) - /* Standard stuff */ + /* Standard stuff */ - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48) - ANALOG_INPUT(V5, 5) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48) + ANALOG_INPUT(V5, 5) //DIODE(D, "1N914") - DIODE(D, "D(IS=1e-15)") + DIODE(D, "D(IS=1e-15)") - RES(R, RES_K(10)) - RES(R1, RES_K(10)) + RES(R, RES_K(10)) + RES(R1, RES_K(10)) - NET_C(clk, D.K) - NET_C(D.A, R.1) - NET_C(R.2, V5) - NET_C(R1.2, GND) - NET_C(R.1, R1.1) + NET_C(clk, D.K) + NET_C(D.A, R.1) + NET_C(R.2, V5) + NET_C(R1.2, GND) + NET_C(R.1, R1.1) - LOG(logB, clk) - LOG(logC, D.A) + LOG(logB, clk) + LOG(logC, D.A) NETLIST_END() diff --git a/src/lib/netlist/examples/kidniki.c b/src/lib/netlist/examples/kidniki.c index edbcf5ce203..b05a3b52d9f 100644 --- a/src/lib/netlist/examples/kidniki.c +++ b/src/lib/netlist/examples/kidniki.c @@ -67,7 +67,7 @@ NETLIST_START(dummy) TTL_INPUT(I_BD0, 1) //CLOCK(I_BD0, 5) TTL_INPUT(I_CH0, 1) - //CLOCK(I_CH0, 5 ) + //CLOCK(I_CH0, 5 ) //TTL_INPUT(I_OH0, 1) CLOCK(I_OH0, 5) TTL_INPUT(I_SOUNDIC0, 1) @@ -351,68 +351,68 @@ NETLIST_END() NETLIST_START(opamp) - /* Opamp model from - * - * http://www.ecircuitcenter.com/Circuits/opmodel1/opmodel1.htm - * - * Bandwidth 1Mhz - * - */ + /* Opamp model from + * + * http://www.ecircuitcenter.com/Circuits/opmodel1/opmodel1.htm + * + * Bandwidth 1Mhz + * + */ - /* Terminal definitions for calling netlists */ + /* Terminal definitions for calling netlists */ - ALIAS(PLUS, G1.IP) // Positive input - ALIAS(MINUS, G1.IN) // Negative input - ALIAS(OUT, EBUF.OP) // Opamp output ... + ALIAS(PLUS, G1.IP) // Positive input + ALIAS(MINUS, G1.IN) // Negative input + ALIAS(OUT, EBUF.OP) // Opamp output ... - ALIAS(GND, EBUF.ON) // GND terminal - ALIAS(VCC, DUMMY.I) // VCC terminal - DUMMY_INPUT(DUMMY) + ALIAS(GND, EBUF.ON) // GND terminal + ALIAS(VCC, DUMMY.I) // VCC terminal + DUMMY_INPUT(DUMMY) - /* The opamp model */ + /* The opamp model */ - VCCS(G1) - PARAM(G1.RI, RES_K(1000)) + VCCS(G1) + PARAM(G1.RI, RES_K(1000)) #if 1 - PARAM(G1.G, 100) // typical OP-AMP amplification 100 * 1000 = 100000 - RES(RP1, 1000) - CAP(CP1, 1.59e-5) // <== change to 1.59e-3 for 10Khz bandwidth + PARAM(G1.G, 100) // typical OP-AMP amplification 100 * 1000 = 100000 + RES(RP1, 1000) + CAP(CP1, 1.59e-5) // <== change to 1.59e-3 for 10Khz bandwidth #else - PARAM(G1.G, 1) // typical OP-AMP amplification 100 * 1000 = 100000 - RES(RP1, 100000) - CAP(CP1, 1.59e-7) // <== change to 1.59e-3 for 10Khz bandwidth + PARAM(G1.G, 1) // typical OP-AMP amplification 100 * 1000 = 100000 + RES(RP1, 100000) + CAP(CP1, 1.59e-7) // <== change to 1.59e-3 for 10Khz bandwidth #endif - VCVS(EBUF) - PARAM(EBUF.RO, 50) - PARAM(EBUF.G, 1) + VCVS(EBUF) + PARAM(EBUF.RO, 50) + PARAM(EBUF.G, 1) // PARAM(EBUF.RI, 1e20) // 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(RP1.1, G1.OP) + NET_C(CP1.1, RP1.1) - DIODE(DP,"1N914") - DIODE(DN,"1N914") + DIODE(DP,"1N914") + DIODE(DN,"1N914") - NET_C(DP.K, VCC) + NET_C(DP.K, VCC) #if 1 - NET_C(DP.A, DN.K, RP1.1) + NET_C(DP.A, DN.K, RP1.1) #else - RES(RDP, 1000) - RES(RDN, 1000) - NET_C(RDP.1, DP.A) - NET_C(RDN.1, DN.K) - NET_C(RDP.2, RDN.2, RP1.1) + RES(RDP, 1000) + RES(RDN, 1000) + NET_C(RDP.1, DP.A) + NET_C(RDN.1, DN.K) + NET_C(RDP.2, RDN.2, RP1.1) #endif - NET_C(DN.A, GND) + NET_C(DN.A, GND) - NET_C(EBUF.IP, RP1.1) + NET_C(EBUF.IP, RP1.1) NETLIST_END() diff --git a/src/lib/netlist/examples/mm5837_noise.c b/src/lib/netlist/examples/mm5837_noise.c index dff1966e1eb..c5237274af0 100644 --- a/src/lib/netlist/examples/mm5837_noise.c +++ b/src/lib/netlist/examples/mm5837_noise.c @@ -9,24 +9,24 @@ NETLIST_START(ne555_astable) - /* - * Astable ne555 - * - */ + /* + * Astable ne555 + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) + SOLVER(Solver, 48000) - ANALOG_INPUT(V12, 12) // 5V + ANALOG_INPUT(V12, 12) // 5V - /* Wiring up the ne555 */ + /* Wiring up the ne555 */ - // astable NE555, 1.13 ms period + // astable NE555, 1.13 ms period - MM5837_DIP(NOISE) + MM5837_DIP(NOISE) - RES(R, 10000) + RES(R, 10000) NET_C(NOISE.1, NOISE.2, R.2, GND) NET_C(NOISE.4, V12) diff --git a/src/lib/netlist/examples/msx_mixer_stage.c b/src/lib/netlist/examples/msx_mixer_stage.c index 445777eb9cf..413ad271e08 100644 --- a/src/lib/netlist/examples/msx_mixer_stage.c +++ b/src/lib/netlist/examples/msx_mixer_stage.c @@ -9,57 +9,57 @@ #include "netlist/devices/net_lib.h" NETLIST_START(msx) - /* The BJT is used as an amplifier. RESCHED_LOOPS must be relatively high to - * allow Newton-Raphson to finish. */ + /* The BJT is used as an amplifier. RESCHED_LOOPS must be relatively high to + * allow Newton-Raphson to finish. */ - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-5) - //PARAM(Solver.CONVERG, 0.3) - PARAM(Solver.GS_LOOPS, 50) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-5) + //PARAM(Solver.CONVERG, 0.3) + PARAM(Solver.GS_LOOPS, 50) - RES(RAY8910, 2345) // Max Voltage + RES(RAY8910, 2345) // Max Voltage - ANALOG_INPUT(V5, 5) - ANALOG_INPUT(V12, 12) + ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V12, 12) - ANALOG_INPUT(SOUND, 5) - ANALOG_INPUT(SND, 5) + ANALOG_INPUT(SOUND, 5) + ANALOG_INPUT(SND, 5) - NET_MODEL("ss9014 NPN(is=2.87599e-14 bf=377.5 vaf=123 ikf=1.1841 ise=4.7863e-15 ne=1.5 br=4.79 var=11.29 ikr=0.275423 isc=1.44544e-14 nc=1.5 rb=200 irb=1e-5 rbm=10 re=0.56 rc=5 cje=1.7205e-11 vje=0.6905907 mje=0.3193434 tf=5.89463e-10 cjc=6.2956p vjc=0.4164212 mjc=0.2559546 xcjc=0.451391 xtb=1.8881 eg=1.2415 xti=3 fc=0.5 Vceo=45 Icrating=0.1 mfg=Fairchild)") + NET_MODEL("ss9014 NPN(is=2.87599e-14 bf=377.5 vaf=123 ikf=1.1841 ise=4.7863e-15 ne=1.5 br=4.79 var=11.29 ikr=0.275423 isc=1.44544e-14 nc=1.5 rb=200 irb=1e-5 rbm=10 re=0.56 rc=5 cje=1.7205e-11 vje=0.6905907 mje=0.3193434 tf=5.89463e-10 cjc=6.2956p vjc=0.4164212 mjc=0.2559546 xcjc=0.451391 xtb=1.8881 eg=1.2415 xti=3 fc=0.5 Vceo=45 Icrating=0.1 mfg=Fairchild)") - RES(R24, RES_K(51)) - RES(R23, RES_K(5)) - RES(R21, RES_K(51)) - RES(R20, RES_K(1)) - RES(R9, RES_K(10)) - RES(R8, 330) + RES(R24, RES_K(51)) + RES(R23, RES_K(5)) + RES(R21, RES_K(51)) + RES(R20, RES_K(1)) + RES(R9, RES_K(10)) + RES(R8, 330) - CAP(C55, CAP_U(5)) // Guessed + CAP(C55, CAP_U(5)) // Guessed - //NET_C(RAY8910.1, SND) - NET_C(RAY8910.1, clk) + //NET_C(RAY8910.1, SND) + NET_C(RAY8910.1, clk) - //NET_C(C55.1, SOUND) - NET_C(C55.1, V5) - NET_C(C55.2, R24.1) - NET_C(R24.2, R23.2) - NET_C(R23.1, RAY8910.2) - NET_C(R23.1, R20.1) - NET_C(R20.2, GND) + //NET_C(C55.1, SOUND) + NET_C(C55.1, V5) + NET_C(C55.2, R24.1) + NET_C(R24.2, R23.2) + NET_C(R23.1, RAY8910.2) + NET_C(R23.1, R20.1) + NET_C(R20.2, GND) - NET_C(R21.1, V5) - NET_C(R21.2, R23.2) + NET_C(R21.1, V5) + NET_C(R21.2, R23.2) - QBJT_EB(T2, "ss9014") + QBJT_EB(T2, "ss9014") - NET_C(R9.1, V12) - NET_C(R9.2, T2.C) - NET_C(R21.2, T2.B) - NET_C(R8.1, T2.E) - NET_C(R8.2, GND) + NET_C(R9.1, V12) + NET_C(R9.2, T2.C) + NET_C(R21.2, T2.B) + NET_C(R8.1, T2.E) + NET_C(R8.2, GND) - //LOG(logB, T2.B) - LOG(logC, T2.C) + //LOG(logB, T2.B) + LOG(logC, T2.C) NETLIST_END() diff --git a/src/lib/netlist/examples/ne555_astable.c b/src/lib/netlist/examples/ne555_astable.c index 0348d3ae4d3..f71076b4e96 100644 --- a/src/lib/netlist/examples/ne555_astable.c +++ b/src/lib/netlist/examples/ne555_astable.c @@ -11,43 +11,43 @@ NETLIST_START(ne555_astable) - /* - * Astable ne555 - * - */ + /* + * Astable ne555 + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) + SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) // 5V + ANALOG_INPUT(V5, 5) // 5V - /* Wiring up the ne555 */ + /* Wiring up the ne555 */ - // astable NE555, 1.13 ms period + // astable NE555, 1.13 ms period - RES(RA, 5000) - RES(RB, 3000) - CAP(C, 0.15e-6) - NE555(555) + RES(RA, 5000) + RES(RB, 3000) + CAP(C, 0.15e-6) + NE555(555) - NET_C(GND, 555.GND) - NET_C(V5, 555.VCC) - NET_C(V5, 555.RESET) + NET_C(GND, 555.GND) + NET_C(V5, 555.VCC) + NET_C(V5, 555.RESET) - 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) + NET_C(555.TRIG, C.1) + NET_C(C.2, GND) - LOG(log2, C.1) - LOG(log3, 555.OUT) + LOG(log2, C.1) + LOG(log3, 555.OUT) NETLIST_END() //! [ne555_example] diff --git a/src/lib/netlist/examples/nmos_fet.cpp b/src/lib/netlist/examples/nmos_fet.cpp index 53c6b4a6fc9..5bec1a97411 100644 --- a/src/lib/netlist/examples/nmos_fet.cpp +++ b/src/lib/netlist/examples/nmos_fet.cpp @@ -10,37 +10,37 @@ #include "netlist/analog/nld_twoterm.h" NETLIST_START(nmos) - /* Standard stuff */ + /* Standard stuff */ - CLOCK(clk, 100) // 100 Hz - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-9) + CLOCK(clk, 100) // 100 Hz + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-9) PARAM(Solver.NR_LOOPS, 50000) PARAM(Solver.DYNAMIC_TS, 1) PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 1e-9) - ANALOG_INPUT(V5, 5) - ANALOG_INPUT(V3, 3.5) + ANALOG_INPUT(V5, 5) + ANALOG_INPUT(V3, 3.5) - /* NMOS - example */ + /* NMOS - example */ NET_MODEL("MM NMOS(VTO=1.0 KP=2e-3 LAMBDA=2E-2)") - MOSFET(M, "MM") + MOSFET(M, "MM") - RES(RB, 1000) - RES(RC, 10000) + RES(RB, 1000) + RES(RC, 10000) - NET_C(RC.1, V5) - NET_C(RC.2, M.D) - NET_C(RB.1, clk) - //NET_C(RB.1, V3) - NET_C(RB.2, M.G) - NET_C(M.S, GND) + NET_C(RC.1, V5) + NET_C(RC.2, M.D) + NET_C(RB.1, clk) + //NET_C(RB.1, V3) + NET_C(RB.2, M.G) + NET_C(M.S, GND) - // put some load on M.D + // put some load on M.D - RES(RCE, 150000) - NET_C(RCE.1, M.D) - NET_C(RCE.2, GND) + RES(RCE, 150000) + NET_C(RCE.1, M.D) + NET_C(RCE.2, GND) // capacitance over G - S @@ -48,7 +48,7 @@ NETLIST_START(nmos) NET_C(M.D, C.1) NET_C(M.S, C.2) - LOG(log_G, M.G) - LOG(log_D, M.D) + LOG(log_G, M.G) + LOG(log_D, M.D) NETLIST_END() diff --git a/src/lib/netlist/examples/norton_opamp.c b/src/lib/netlist/examples/norton_opamp.c index 8e077a91df2..a6cf52ce152 100644 --- a/src/lib/netlist/examples/norton_opamp.c +++ b/src/lib/netlist/examples/norton_opamp.c @@ -8,119 +8,119 @@ NETLIST_START(main) - /* Standard stuff */ - - CLOCK(clk, 10000) // 1000 Hz - SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) - PARAM(Solver.ACCURACY, 1e-6) - PARAM(Solver.DYNAMIC_TS, 0) - PARAM(Solver.SOR_FACTOR, 1.0) - //PARAM(Solver.CONVERG, 1.0) - PARAM(Solver.GS_LOOPS, 5) - - SUBMODEL(op1, opamp_fast) - /* Wired as non - inverting amplifier like in LM3900 datasheet */ - - RES(R1, 25000) - RES(R2, 100000) - RES(R3, 200000) - CAP(C1, CAP_U(0.05)) - - NET_C(clk, C1.1) - NET_C(C1.2, R1.1) - - NET_C(op1.VM, GND) - NET_C(op1.VP, V5 ) - NET_C(op1.PLUS, R1.2, R3.1) - NET_C(R3.2, V5) - //NET_C(R3.2, GND) - NET_C(op1.MINUS, R2.2) - NET_C(op1.OUT, R2.1) - - RES(RL, 10000) - NET_C(RL.2, GND) - NET_C(RL.1, op1.OUT) - - LOG(logX, op1.OUT) - LOG(logY, clk) + /* Standard stuff */ + + CLOCK(clk, 10000) // 1000 Hz + SOLVER(Solver, 48000) + ANALOG_INPUT(V5, 5) + PARAM(Solver.ACCURACY, 1e-6) + PARAM(Solver.DYNAMIC_TS, 0) + PARAM(Solver.SOR_FACTOR, 1.0) + //PARAM(Solver.CONVERG, 1.0) + PARAM(Solver.GS_LOOPS, 5) + + SUBMODEL(op1, opamp_fast) + /* Wired as non - inverting amplifier like in LM3900 datasheet */ + + RES(R1, 25000) + RES(R2, 100000) + RES(R3, 200000) + CAP(C1, CAP_U(0.05)) + + NET_C(clk, C1.1) + NET_C(C1.2, R1.1) + + NET_C(op1.VM, GND) + NET_C(op1.VP, V5 ) + NET_C(op1.PLUS, R1.2, R3.1) + NET_C(R3.2, V5) + //NET_C(R3.2, GND) + NET_C(op1.MINUS, R2.2) + NET_C(op1.OUT, R2.1) + + RES(RL, 10000) + NET_C(RL.2, GND) + NET_C(RL.1, op1.OUT) + + LOG(logX, op1.OUT) + LOG(logY, clk) NETLIST_END() NETLIST_START(opamp) - /* Opamp model from - * - * http://www.ecircuitcenter.com/Circuits/opmodel1/opmodel1.htm - * - * Bandwidth 10Mhz - * - */ - - /* Terminal definitions for calling netlists */ - - ALIAS(PLUS, G1.IP) // Positive input - ALIAS(MINUS, G2.IN) // Negative input - ALIAS(OUT, EBUF.OP) // Opamp output ... - ALIAS(VM, EBUF.ON) // V- terminal - ALIAS(VP, DUMMY.I) // V+ terminal - - DUMMY_INPUT(DUMMY) - - /* The opamp model */ - - CCCS(G1) - CCCS(G2) - //PARAM(G1.G, 100) // typical OP-AMP amplification 100 * 1000 = 100000 - PARAM(G1.G, 1000000) // typical OP-AMP amplification 100 * 1000 = 100000 - PARAM(G2.G, 1000000) // typical OP-AMP amplification 100 * 1000 = 100000 - RES(RP1, 1000) - CAP(CP1, 1.59e-6) // <== change to 1.59e-3 for 10Khz bandwidth - VCVS(EBUF) - PARAM(EBUF.RO, 50) - PARAM(EBUF.G, 1) + /* Opamp model from + * + * http://www.ecircuitcenter.com/Circuits/opmodel1/opmodel1.htm + * + * Bandwidth 10Mhz + * + */ + + /* Terminal definitions for calling netlists */ + + ALIAS(PLUS, G1.IP) // Positive input + ALIAS(MINUS, G2.IN) // Negative input + ALIAS(OUT, EBUF.OP) // Opamp output ... + ALIAS(VM, EBUF.ON) // V- terminal + ALIAS(VP, DUMMY.I) // V+ terminal + + DUMMY_INPUT(DUMMY) + + /* The opamp model */ + + CCCS(G1) + CCCS(G2) + //PARAM(G1.G, 100) // typical OP-AMP amplification 100 * 1000 = 100000 + PARAM(G1.G, 1000000) // typical OP-AMP amplification 100 * 1000 = 100000 + PARAM(G2.G, 1000000) // typical OP-AMP amplification 100 * 1000 = 100000 + RES(RP1, 1000) + CAP(CP1, 1.59e-6) // <== change to 1.59e-3 for 10Khz bandwidth + VCVS(EBUF) + PARAM(EBUF.RO, 50) + PARAM(EBUF.G, 1) // NET_C(EBUF.ON, GND) - NET_C(G1.ON, GND) - NET_C(G2.ON, GND) - NET_C(RP1.2, GND) - NET_C(CP1.2, GND) - NET_C(EBUF.IN, GND) + NET_C(G1.ON, GND) + NET_C(G2.ON, GND) + NET_C(RP1.2, GND) + NET_C(CP1.2, GND) + NET_C(EBUF.IN, GND) - NET_C(G1.IN, G2.IP, GND) + NET_C(G1.IN, G2.IP, GND) - NET_C(RP1.1, G1.OP) - NET_C(RP1.1, G2.OP) - NET_C(CP1.1, RP1.1) - NET_C(EBUF.IP, RP1.1) + NET_C(RP1.1, G1.OP) + NET_C(RP1.1, G2.OP) + NET_C(CP1.1, RP1.1) + NET_C(EBUF.IP, RP1.1) NETLIST_END() NETLIST_START(opamp_fast) - /* - * Fast norton opamp model without bandwidth - */ + /* + * Fast norton opamp model without bandwidth + */ - /* Terminal definitions for calling netlists */ + /* Terminal definitions for calling netlists */ - ALIAS(PLUS, R1.1) // Positive input - ALIAS(MINUS, R2.1) // Negative input - ALIAS(OUT, G1.OP) // Opamp output ... - ALIAS(VM, G1.ON) // V- terminal - ALIAS(VP, DUMMY.I) // V+ terminal + ALIAS(PLUS, R1.1) // Positive input + ALIAS(MINUS, R2.1) // Negative input + ALIAS(OUT, G1.OP) // Opamp output ... + ALIAS(VM, G1.ON) // V- terminal + ALIAS(VP, DUMMY.I) // V+ terminal - DUMMY_INPUT(DUMMY) + DUMMY_INPUT(DUMMY) - /* The opamp model */ + /* The opamp model */ - RES(R1, 1) - RES(R2, 1) - NET_C(R1.1, G1.IP) - NET_C(R2.1, G1.IN) - NET_C(R1.2, R2.2, G1.ON) - VCVS(G1) - PARAM(G1.G, 1000000) - PARAM(G1.RO, RES_K(8)) + RES(R1, 1) + RES(R2, 1) + NET_C(R1.1, G1.IP) + NET_C(R2.1, G1.IN) + NET_C(R1.2, R2.2, G1.ON) + VCVS(G1) + PARAM(G1.G, 1000000) + PARAM(G1.RO, RES_K(8)) NETLIST_END() diff --git a/src/lib/netlist/examples/opamp.c b/src/lib/netlist/examples/opamp.c index b13d92dab67..b3730b29b51 100644 --- a/src/lib/netlist/examples/opamp.c +++ b/src/lib/netlist/examples/opamp.c @@ -10,91 +10,91 @@ NETLIST_START(main) - /* Standard stuff */ + /* Standard stuff */ - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 480000) - PARAM(Solver.ACCURACY, 1e-10) - PARAM(Solver.NR_LOOPS, 30000 ) - //PARAM(Solver.CONVERG, 1.0) - PARAM(Solver.GS_LOOPS, 30) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 480000) + PARAM(Solver.ACCURACY, 1e-10) + PARAM(Solver.NR_LOOPS, 30000 ) + //PARAM(Solver.CONVERG, 1.0) + PARAM(Solver.GS_LOOPS, 30) - // Tie up +5 to opamps thought it's not currently needed - // Stay compatible - ANALOG_INPUT(V5, 5) - NET_C(op.VCC, V5) - NET_C(op1.VCC, V5) + // Tie up +5 to opamps thought it's not currently needed + // Stay compatible + ANALOG_INPUT(V5, 5) + NET_C(op.VCC, V5) + NET_C(op1.VCC, V5) - /* Opamp wired as impedance changer */ - SUBMODEL(opamp, op) + /* Opamp wired as impedance changer */ + SUBMODEL(opamp, op) - NET_C(op.GND, GND) - NET_C(op.PLUS, clk) - NET_C(op.MINUS, op.OUT) + NET_C(op.GND, GND) + NET_C(op.PLUS, clk) + NET_C(op.MINUS, op.OUT) - SUBMODEL(opamp, op1) - /* Wired as inverting amplifier connected to output of first opamp */ + SUBMODEL(opamp, op1) + /* Wired as inverting amplifier connected to output of first opamp */ - RES(R1, 100000) - RES(R2, 200000) + RES(R1, 100000) + RES(R2, 200000) - NET_C(op1.GND, GND) - NET_C(op1.PLUS, GND) - NET_C(op1.MINUS, R2.2) - NET_C(op1.MINUS, R1.2) + NET_C(op1.GND, GND) + NET_C(op1.PLUS, GND) + NET_C(op1.MINUS, R2.2) + NET_C(op1.MINUS, R1.2) - NET_C(op.OUT, R1.1) - NET_C(op1.OUT, R2.1) + NET_C(op.OUT, R1.1) + NET_C(op1.OUT, R2.1) - RES(RL, 1000) - NET_C(RL.2, GND) - NET_C(RL.1, op1.OUT) + RES(RL, 1000) + NET_C(RL.2, GND) + NET_C(RL.1, op1.OUT) - LOG(log_X, op1.OUT) - LOG(log_Y, clk) + LOG(log_X, op1.OUT) + LOG(log_Y, clk) NETLIST_END() NETLIST_START(opamp) - /* Opamp model from - * - * http://www.ecircuitcenter.com/Circuits/opmodel1/opmodel1.htm - * - * Bandwidth 10Mhz - * - */ + /* Opamp model from + * + * http://www.ecircuitcenter.com/Circuits/opmodel1/opmodel1.htm + * + * Bandwidth 10Mhz + * + */ - /* Terminal definitions for calling netlists */ + /* Terminal definitions for calling netlists */ - ALIAS(PLUS, G1.IP) // Positive input - ALIAS(MINUS, G1.IN) // Negative input - ALIAS(OUT, EBUF.OP) // Opamp output ... + ALIAS(PLUS, G1.IP) // Positive input + ALIAS(MINUS, G1.IN) // Negative input + ALIAS(OUT, EBUF.OP) // Opamp output ... - ALIAS(GND, EBUF.ON) // GND terminal - ALIAS(VCC, DUMMY.I) // VCC terminal - DUMMY_INPUT(DUMMY) + ALIAS(GND, EBUF.ON) // GND terminal + ALIAS(VCC, DUMMY.I) // VCC terminal + DUMMY_INPUT(DUMMY) - /* The opamp model */ + /* The opamp model */ - LVCCS(G1) - PARAM(G1.G, 0.0021) + LVCCS(G1) + PARAM(G1.G, 0.0021) PARAM(G1.CURLIM, 0.002) - RES(RP1, 1e7) - CAP(CP1, 0.00333e-6) - VCVS(EBUF) - PARAM(EBUF.RO, 50) - PARAM(EBUF.G, 1) + RES(RP1, 1e7) + CAP(CP1, 0.00333e-6) + VCVS(EBUF) + PARAM(EBUF.RO, 50) + PARAM(EBUF.G, 1) // 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) NETLIST_END() @@ -110,12 +110,12 @@ NETLIST_START(opamp_mod) * * Simple Opamp Model Calculation * - * First Pole Frequency 5 Hz - * Unity Gain Frequency 11,000 Hz - * RP 100,000 Ohm - * DC Gain / Aol 2200 - * CP 0.318 uF - * KG 0.022 + * First Pole Frequency 5 Hz + * Unity Gain Frequency 11,000 Hz + * RP 100,000 Ohm + * DC Gain / Aol 2200 + * CP 0.318 uF + * KG 0.022 * */ diff --git a/src/lib/netlist/examples/opamp_amplification_curve.cpp b/src/lib/netlist/examples/opamp_amplification_curve.cpp index e1665244b0e..ed5d1709985 100644 --- a/src/lib/netlist/examples/opamp_amplification_curve.cpp +++ b/src/lib/netlist/examples/opamp_amplification_curve.cpp @@ -22,14 +22,14 @@ NETLIST_START(main) - /* Standard stuff */ - - //VARCLOCK(clk, "0.5 / pow(10, 1 + T * 4)") - //CLOCK(clk, 1000) - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-7) - PARAM(Solver.NR_LOOPS, 300) - PARAM(Solver.DYNAMIC_TS, 1) + /* Standard stuff */ + + //VARCLOCK(clk, "0.5 / pow(10, 1 + T * 4)") + //CLOCK(clk, 1000) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-7) + PARAM(Solver.NR_LOOPS, 300) + PARAM(Solver.DYNAMIC_TS, 1) PARAM(Solver.DYNAMIC_MIN_TIMESTEP, 1e-7) VS(vs, 0) @@ -59,36 +59,36 @@ NETLIST_START(main) PARAM(vs.R, 0.001) ALIAS(clk, vs.1) NET_C(vs.2, GND) - ANALOG_INPUT(V12, 12) - ANALOG_INPUT(VM12, -12) + ANALOG_INPUT(V12, 12) + ANALOG_INPUT(VM12, -12) - OPAMP(op, OPAMP_TEST) + OPAMP(op, OPAMP_TEST) - NET_C(op.GND, VM12) - NET_C(op.VCC, V12) + NET_C(op.GND, VM12) + NET_C(op.VCC, V12) - /* Opamp B wired as inverting amplifier connected to output of first opamp */ + /* Opamp B wired as inverting amplifier connected to output of first opamp */ - RES(R1, 100) - RES(RP, 100) - RES(R2, 10000000) + RES(R1, 100) + RES(RP, 100) + RES(R2, 10000000) - NET_C(op.PLUS, RP.1) + NET_C(op.PLUS, RP.1) NET_C(RP.2, GND) - NET_C(op.MINUS, R2.2) - NET_C(op.MINUS, R1.2) + NET_C(op.MINUS, R2.2) + NET_C(op.MINUS, R1.2) - NET_C(clk, R1.1) - NET_C(op.OUT, R2.1) + NET_C(clk, R1.1) + NET_C(op.OUT, R2.1) - RES(RL, 2000) - NET_C(RL.2, GND) - NET_C(RL.1, op.OUT) + RES(RL, 2000) + NET_C(RL.2, GND) + NET_C(RL.1, op.OUT) AFUNC(f, 1, "A0 * 1000") NET_C(f.A0, op.OUT) #if 1 - LOG(log_Y, R1.1) - LOG(log_Z, f) + LOG(log_Y, R1.1) + LOG(log_Z, f) #endif NETLIST_END() diff --git a/src/lib/netlist/examples/rc.c b/src/lib/netlist/examples/rc.c index 1850da313da..140440011b9 100644 --- a/src/lib/netlist/examples/rc.c +++ b/src/lib/netlist/examples/rc.c @@ -7,25 +7,25 @@ NETLIST_START(rc) - /* - * delay circuit - * - */ + /* + * delay circuit + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-6) - CLOCK(clk, 20000) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-6) + CLOCK(clk, 20000) - CAP(C1, 0.022e-6) - RES(R1, 10000) - RES(R2, 20000) + CAP(C1, 0.022e-6) + RES(R1, 10000) + RES(R2, 20000) - NET_C(clk, R2.1) - NET_C(R2.2, R1.1, C1.1) - NET_C(C1.2, R1.2, GND) + NET_C(clk, R2.1) + NET_C(R2.2, R1.1, C1.1) + NET_C(C1.2, R1.2, GND) - LOG(tt, C1.1) + LOG(tt, C1.1) NETLIST_END() diff --git a/src/lib/netlist/examples/rl.c b/src/lib/netlist/examples/rl.c index 2848348c440..b9f4e4e64c0 100644 --- a/src/lib/netlist/examples/rl.c +++ b/src/lib/netlist/examples/rl.c @@ -7,26 +7,26 @@ NETLIST_START(lr) - /* - * delay circuit - * - */ + /* + * delay circuit + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-6) - CLOCK(clk, 50) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-6) + CLOCK(clk, 50) PARAM(Solver.METHOD, "MAT_CR") - IND(L1, 10) - RES(R1, 10000) - - NET_C(clk, L1.1) - NET_C(L1.2, R1.1) - NET_C(R1.2, GND) + IND(L1, 10) + RES(R1, 10000) - //LOG(log_1, R1.1) - //LOG(log_2, clk) + NET_C(clk, L1.1) + NET_C(L1.2, R1.1) + NET_C(R1.2, GND) + + //LOG(log_1, R1.1) + //LOG(log_2, clk) NETLIST_END() diff --git a/src/lib/netlist/examples/sn74ls629_osc.c b/src/lib/netlist/examples/sn74ls629_osc.c index f40c464f55c..3f797d9474d 100644 --- a/src/lib/netlist/examples/sn74ls629_osc.c +++ b/src/lib/netlist/examples/sn74ls629_osc.c @@ -9,26 +9,26 @@ NETLIST_START(ls629) - /* - * Astable ne555 - * - */ + /* + * Astable ne555 + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) + SOLVER(Solver, 48000) - ANALOG_INPUT(V5, 5) // 5V - ANALOG_INPUT(VF, 2.5) // 5V - ANALOG_INPUT(VR, 5) // 5V + ANALOG_INPUT(V5, 5) // 5V + ANALOG_INPUT(VF, 2.5) // 5V + ANALOG_INPUT(VR, 5) // 5V - SN74LS629(OSC, 0.022e-6) + SN74LS629(OSC, 0.022e-6) - NET_C(GND, OSC.GND) - NET_C(VR, OSC.RNG) - NET_C(VF, OSC.FC) - NET_C(GND, OSC.ENQ) + NET_C(GND, OSC.GND) + NET_C(VR, OSC.RNG) + NET_C(VF, OSC.FC) + NET_C(GND, OSC.ENQ) - LOG(log2, OSC.Y) + LOG(log2, OSC.Y) NETLIST_END() diff --git a/src/lib/netlist/examples/test.c b/src/lib/netlist/examples/test.c index 9a75dd3ad91..bee32494710 100644 --- a/src/lib/netlist/examples/test.c +++ b/src/lib/netlist/examples/test.c @@ -10,78 +10,78 @@ #include "netlist/devices/net_lib.h" NETLIST_START(bjt) - /* Standard stuff */ - - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48000) - - ANALOG_INPUT(V3, 3) - ANALOG_INPUT(STOPG, 0) - ALIAS(SRSTQ, RYf.2) - ALIAS(SRST, RYc.2) - NET_C(antenna, GND) - ALIAS(runQ, Q1.C) - - TTL_7404_INVERT(e4d, STOPG) - - RES(RYf, 50) // output impedance - RES(RYc, 50) // output impedance - - TTL_7404_INVERT(c9f, RYc.2) - TTL_7404_INVERT(c9c, RYf.2) - NET_C(c9f.Q, RYf.1) - NET_C(c9c.Q, RYc.1) - - SWITCH2(coinsw, RYc.2, RYf.2) - - NET_C(coinsw.Q, GND) - - /* Antenna circuit */ - /* Also has a diode to clamp negative voltages - omitted here */ - NETDEV_QNPN(Q3, BC237B) - ALIAS(antenna, Q3.B) - NET_C(GND, Q3.E) - RES(RX5, 100) - CAP(CX1, 100) - NET_C(RX5.1, CX1.1) - NET_C(RX5.1, Q3.C) - NET_C(RX5.2, GND) - NET_C(CX1.2, GND) - NETDEV_QNPN(Q1, BC237B) - NET_C(Q1.B, RX5.1) - NET_C(Q1.E, GND) - - DIODE(D3, 1N914) - NET_C(D3.A, Q1.C) - NET_C(D3.K, SRSTQ) - - DIODE(D2, 1N914) - RES(RX4, 220) - NET_C(D2.K, e4d.Q) - NET_C(D2.A, RX4.1) - NET_C(RX4.2, Q3.C) - - RES(RX1, 100) - RES(RX2, 100) - RES(RX3, 330) - CAP(CX2, CAP_U(0.1)) - - NET_C(RX3.2, D3.A) - NET_C(RX3.1, RX1.2) - NET_C(RX1.1, V3) - - NET_C(RX1.1, CX2.1) - NET_C(RX1.2, CX2.2) - - NETDEV_QPNP(Q2, BC556B) - NET_C(Q2.E, V3) - NET_C(Q2.B, RX1.2) - NET_C(Q2.C, RX2.2) - - NET_C(RX2.1, D2.A) - - - //LOG(logB, Q1.B) - //LOG(logC, Q1.C) + /* Standard stuff */ + + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) + + ANALOG_INPUT(V3, 3) + ANALOG_INPUT(STOPG, 0) + ALIAS(SRSTQ, RYf.2) + ALIAS(SRST, RYc.2) + NET_C(antenna, GND) + ALIAS(runQ, Q1.C) + + TTL_7404_INVERT(e4d, STOPG) + + RES(RYf, 50) // output impedance + RES(RYc, 50) // output impedance + + TTL_7404_INVERT(c9f, RYc.2) + TTL_7404_INVERT(c9c, RYf.2) + NET_C(c9f.Q, RYf.1) + NET_C(c9c.Q, RYc.1) + + SWITCH2(coinsw, RYc.2, RYf.2) + + NET_C(coinsw.Q, GND) + + /* Antenna circuit */ + /* Also has a diode to clamp negative voltages - omitted here */ + NETDEV_QNPN(Q3, BC237B) + ALIAS(antenna, Q3.B) + NET_C(GND, Q3.E) + RES(RX5, 100) + CAP(CX1, 100) + NET_C(RX5.1, CX1.1) + NET_C(RX5.1, Q3.C) + NET_C(RX5.2, GND) + NET_C(CX1.2, GND) + NETDEV_QNPN(Q1, BC237B) + NET_C(Q1.B, RX5.1) + NET_C(Q1.E, GND) + + DIODE(D3, 1N914) + NET_C(D3.A, Q1.C) + NET_C(D3.K, SRSTQ) + + DIODE(D2, 1N914) + RES(RX4, 220) + NET_C(D2.K, e4d.Q) + NET_C(D2.A, RX4.1) + NET_C(RX4.2, Q3.C) + + RES(RX1, 100) + RES(RX2, 100) + RES(RX3, 330) + CAP(CX2, CAP_U(0.1)) + + NET_C(RX3.2, D3.A) + NET_C(RX3.1, RX1.2) + NET_C(RX1.1, V3) + + NET_C(RX1.1, CX2.1) + NET_C(RX1.2, CX2.2) + + NETDEV_QPNP(Q2, BC556B) + NET_C(Q2.E, V3) + NET_C(Q2.B, RX1.2) + NET_C(Q2.C, RX2.2) + + NET_C(RX2.1, D2.A) + + + //LOG(logB, Q1.B) + //LOG(logC, Q1.C) NETLIST_END() diff --git a/src/lib/netlist/examples/todo.c b/src/lib/netlist/examples/todo.c index 62c713e86fd..6e9257f5410 100644 --- a/src/lib/netlist/examples/todo.c +++ b/src/lib/netlist/examples/todo.c @@ -43,47 +43,47 @@ NETLIST_END() #if 0 - RES(R1, 10) - RES(R2, 10) - RES(R3, 10) - NET_C(V5,R1.1) - NET_C(R1.2, R2.1) - NET_C(R2.2, R3.1) - NET_C(R3.2, GND) + RES(R1, 10) + RES(R2, 10) + RES(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 - RES(R4, 1000) - CAP(C1, 1e-6) - NET_C(V5,R4.1) - NET_C(R4.2, C1.1) - NET_C(C1.2, GND) - //LOG(log1, C1.1) + RES(R4, 1000) + CAP(C1, 1e-6) + NET_C(V5,R4.1) + NET_C(R4.2, C1.1) + NET_C(C1.2, GND) + //LOG(log1, C1.1) #endif #if 0 - RES(R5, 1000) - NETDEV_1N914(D1) - NET_C(V5, R5.1) - NET_C(R5.2, D1.A) - NET_C(D1.K, GND) - //LOG(log1, D1.A) + RES(R5, 1000) + NETDEV_1N914(D1) + NET_C(V5, R5.1) + NET_C(R5.2, D1.A) + NET_C(D1.K, GND) + //LOG(log1, D1.A) #endif #if 0 #endif #if 0 - NETDEV_VCVS(VV) - RES(R1, 1000) - RES(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) - LOG(logX, VV.OP) + NETDEV_VCVS(VV) + RES(R1, 1000) + RES(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) + LOG(logX, VV.OP) #endif @@ -91,50 +91,50 @@ NETLIST_END() #endif #if 0 - NETDEV_VCVS(VV) - PARAM(VV.G, 100000) // typical OP-AMP amplification - PARAM(VV.RO, 50) // typical OP-AMP amplification - RES(R1, 1000) - RES(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) - LOG(logX, VV.OP) - LOG(logY, 4V) + NETDEV_VCVS(VV) + PARAM(VV.G, 100000) // typical OP-AMP amplification + PARAM(VV.RO, 50) // typical OP-AMP amplification + RES(R1, 1000) + RES(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) + LOG(logX, VV.OP) + LOG(logY, 4V) #endif #if 0 - // Impedance converter with resistor - NETDEV_VCVS(VV) - PARAM(VV.G, 100000) // typical OP-AMP amplification - PARAM(VV.RO, 50) // typical OP-AMP amplification - RES(R3, 10000) - - NET_C(4V, VV.IP) - NET_C(R3.1, VV.IN) - NET_C(R3.2, VV.OP) - NET_C(VV.ON, GND) - LOG(logX, VV.OP) - LOG(logY, 4V) + // Impedance converter with resistor + NETDEV_VCVS(VV) + PARAM(VV.G, 100000) // typical OP-AMP amplification + PARAM(VV.RO, 50) // typical OP-AMP amplification + RES(R3, 10000) + + NET_C(4V, VV.IP) + NET_C(R3.1, VV.IN) + NET_C(R3.2, VV.OP) + NET_C(VV.ON, GND) + LOG(logX, VV.OP) + LOG(logY, 4V) #endif #if 0 - // Impedance converter without resistor - NETDEV_VCVS(VV) - PARAM(VV.G, 100000) // typical OP-AMP amplification - PARAM(VV.RO, 50) // typical OP-AMP amplification - - NET_C(4V, VV.IP) - NET_C(VV.IN, VV.OP) - NET_C(VV.ON, GND) - LOG(logX, VV.OP) - LOG(logY, 4V) + // Impedance converter without resistor + NETDEV_VCVS(VV) + PARAM(VV.G, 100000) // typical OP-AMP amplification + PARAM(VV.RO, 50) // typical OP-AMP amplification + + NET_C(4V, VV.IP) + NET_C(VV.IN, VV.OP) + NET_C(VV.ON, GND) + LOG(logX, VV.OP) + LOG(logY, 4V) #endif diff --git a/src/lib/netlist/examples/vccs.c b/src/lib/netlist/examples/vccs.c index 27ebf5a64e0..0e76ba6b219 100644 --- a/src/lib/netlist/examples/vccs.c +++ b/src/lib/netlist/examples/vccs.c @@ -10,21 +10,21 @@ NETLIST_START(vccs) - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-12) - PARAM(Solver.GS_LOOPS, 10000) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-12) + PARAM(Solver.GS_LOOPS, 10000) - VCCS(VV) - PARAM(VV.G, 100) // typical OP-AMP amplification - RES(R2, 1) + VCCS(VV) + PARAM(VV.G, 100) // typical OP-AMP amplification + RES(R2, 1) - NET_C(clk, VV.IN) - NET_C(R2.1, VV.OP) - NET_C(R2.2, GND) - NET_C(VV.ON, GND) - NET_C(VV.IP, GND) - LOG(logX, VV.OP) - LOG(logY, clk) + NET_C(clk, VV.IN) + NET_C(R2.1, VV.OP) + NET_C(R2.2, GND) + NET_C(VV.ON, GND) + NET_C(VV.IP, GND) + LOG(logX, VV.OP) + LOG(logY, clk) NETLIST_END() diff --git a/src/lib/netlist/examples/vccs1.c b/src/lib/netlist/examples/vccs1.c index 7e6dd1ea48c..b3513b325b7 100644 --- a/src/lib/netlist/examples/vccs1.c +++ b/src/lib/netlist/examples/vccs1.c @@ -10,26 +10,26 @@ NETLIST_START(vccs) - CLOCK(clk, 1000) // 1000 Hz - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-6) - - - VCCS(VV) - PARAM(VV.G, 100000) // typical OP-AMP amplification - RES(R1, 10000) - RES(R2, 1) - RES(R3, 1000) - - NET_C(clk, 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) - LOG(logX, VV.OP) - LOG(logY, clk) + CLOCK(clk, 1000) // 1000 Hz + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-6) + + + VCCS(VV) + PARAM(VV.G, 100000) // typical OP-AMP amplification + RES(R1, 10000) + RES(R2, 1) + RES(R3, 1000) + + NET_C(clk, 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) + LOG(logX, VV.OP) + LOG(logY, clk) NETLIST_END() diff --git a/src/lib/netlist/examples/vs.c b/src/lib/netlist/examples/vs.c index 7d72398e297..583b94d7c4f 100644 --- a/src/lib/netlist/examples/vs.c +++ b/src/lib/netlist/examples/vs.c @@ -11,10 +11,10 @@ NETLIST_START(vs) - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 480) - PARAM(Solver.ACCURACY, 1e-6) + SOLVER(Solver, 480) + PARAM(Solver.ACCURACY, 1e-6) PARAM(Solver.METHOD, "MAT_CR") PARAM(Solver.DYNAMIC_TS, 1) @@ -26,7 +26,7 @@ NETLIST_START(vs) NET_C(R1.2, VS1.N) NET_C(GND, VS1.N) - //LOG(tt, VS1.P) - //LOG(tt1, R1.1) + //LOG(tt, VS1.P) + //LOG(tt1, R1.1) NETLIST_END() diff --git a/src/lib/netlist/examples/vs_cs.c b/src/lib/netlist/examples/vs_cs.c index 9b39106a540..252eb9cad3f 100644 --- a/src/lib/netlist/examples/vs_cs.c +++ b/src/lib/netlist/examples/vs_cs.c @@ -11,20 +11,20 @@ NETLIST_START(rc) - /* - * delay circuit - * - */ + /* + * delay circuit + * + */ - /* Standard stuff */ + /* Standard stuff */ - SOLVER(Solver, 48000) - PARAM(Solver.ACCURACY, 1e-6) - CLOCK(clk, 20000) + SOLVER(Solver, 48000) + PARAM(Solver.ACCURACY, 1e-6) + CLOCK(clk, 20000) /* Voltage source. Inner resistance will make clock visible */ - RES(R1, 1000) + RES(R1, 1000) VS(VS1, 1) NET_C(R1.1, clk) NET_C(R1.2, VS1.P) @@ -34,8 +34,8 @@ NETLIST_START(rc) * need negative current */ - RES(R2, 1000) - RES(R3, 1000) + RES(R2, 1000) + RES(R3, 1000) CS(CS1, -0.001) NET_C(CS1.P, R2.1) NET_C(R2.2, R3.1) @@ -46,7 +46,7 @@ NETLIST_START(rc) NET_C(C1.2, R3.2) - LOG(tt, VS1.P) - LOG(tx, R2.2) + LOG(tt, VS1.P) + LOG(tx, R2.2) NETLIST_END() diff --git a/src/mame/drivers/armedf.cpp b/src/mame/drivers/armedf.cpp index 92926c1cb33..9c9e99b382a 100644 --- a/src/mame/drivers/armedf.cpp +++ b/src/mame/drivers/armedf.cpp @@ -1119,7 +1119,7 @@ void armedf_state::video_config(machine_config &config, int hchar_start, int vst // assume all games on this HW running at ~59.1358Hz (trusted for Big Fighter) // TODO: recheck if visible area isn't just 320x240 for everything (overscan may be masked by the text layer). // TODO: bootlegs may not run at this speed - m_screen->set_raw(XTAL(16'000'000)/2,531,hchar_start*8,(64-hchar_start)*8, 255, vstart, vend); + m_screen->set_raw(XTAL(16'000'000)/2,531,hchar_start*8,(64-hchar_start)*8, 255, vstart, vend); m_screen->set_palette(m_palette); m_screen->set_screen_update(FUNC(armedf_state::screen_update_armedf)); m_screen->screen_vblank().set(m_spriteram, FUNC(buffered_spriteram16_device::vblank_copy_rising)); diff --git a/src/mame/drivers/atetris.cpp b/src/mame/drivers/atetris.cpp index 956d7d2538e..e43c0051391 100644 --- a/src/mame/drivers/atetris.cpp +++ b/src/mame/drivers/atetris.cpp @@ -604,13 +604,13 @@ ROM_END /* - This ROM came from a prototype bartop field-test machine from an + This ROM came from a prototype bartop field-test machine from an ex-Atari Employee. PCB is screened : A044809 - The PCB does not draw its power from the JAMMA connector, instead a -small AC voltage is taken onboard and regulated down as this pcb has + The PCB does not draw its power from the JAMMA connector, instead a +small AC voltage is taken onboard and regulated down as this pcb has only a small power requirement! The label on the rom says : @@ -622,7 +622,7 @@ B4FF The cabinet is completely custom made by Atari, and this pcb differs greatly from the production pcb that we know of. The machine was operated -on location at a local bar but did not perform well so they decided it +on location at a local bar but did not perform well so they decided it wasn't a viable game to make, its the only known example. */ diff --git a/src/mame/drivers/dccons.cpp b/src/mame/drivers/dccons.cpp index 735b5f601b7..cb56a3ad89a 100644 --- a/src/mame/drivers/dccons.cpp +++ b/src/mame/drivers/dccons.cpp @@ -1,4 +1,4 @@ -// license:LGPL-2.1+ +// license:LGPL-2.1+ // copyright-holders:Angelo Salese, R. Belmont /* dccons.cpp - Sega Dreamcast driver diff --git a/src/mame/drivers/dec8.cpp b/src/mame/drivers/dec8.cpp index 7a766ddc55a..b6424e510f3 100644 --- a/src/mame/drivers/dec8.cpp +++ b/src/mame/drivers/dec8.cpp @@ -2695,7 +2695,7 @@ ROM_START( gondou ) ROM_LOAD( "dt17.f11", 0x50000, 0x08000, CRC(3bbcff0d) SHA1(a8f7aa56ff49ed6b29240c3504d6c9945944953b) ) // Unique data to the US set ROM_LOAD( "dt21.f16", 0x60000, 0x10000, CRC(1c5f682d) SHA1(4b7022cce930a9e9a0087c91e8344269fe7ed889) ) ROM_LOAD( "dt22.f18", 0x70000, 0x08000, CRC(c1876a5f) SHA1(66122ce765723765e20036bd4d461a210c8b94d3) ) // Unique data to the US set - + ROM_REGION( 0x80000, "gfx3", 0 ) /* tiles */ ROM_LOAD( "dt08.h10", 0x00000, 0x08000, CRC(aec483f5) SHA1(1d6de823ab0eeb9c89e9c227428ff278663627f3) ) // Tiles data is the same for all 3 regions ROM_CONTINUE( 0x10000, 0x08000 ) diff --git a/src/mame/drivers/dreamwld.cpp b/src/mame/drivers/dreamwld.cpp index d26c5ecec0d..c0468850dc6 100644 --- a/src/mame/drivers/dreamwld.cpp +++ b/src/mame/drivers/dreamwld.cpp @@ -178,7 +178,7 @@ private: DECLARE_WRITE8_MEMBER(prot_p1_w); DECLARE_WRITE8_MEMBER(prot_p2_w); DECLARE_READ8_MEMBER(prot_p2_r); - + DECLARE_WRITE32_MEMBER(to_prot_w); @@ -813,7 +813,7 @@ void dreamwld_state::baryon(machine_config &config) m_mcu->port_out_cb<1>().set(FUNC(dreamwld_state::prot_p1_w)); m_mcu->port_out_cb<2>().set(FUNC(dreamwld_state::prot_p2_w)); m_mcu->port_in_cb<2>().set(FUNC(dreamwld_state::prot_p2_r)); - + //config.set_perfect_quantum(m_maincpu); /* video hardware */ diff --git a/src/mame/drivers/esd16.cpp b/src/mame/drivers/esd16.cpp index 4f0c93e4ae5..a5edbce82cf 100644 --- a/src/mame/drivers/esd16.cpp +++ b/src/mame/drivers/esd16.cpp @@ -521,7 +521,7 @@ static INPUT_PORTS_START( fantstry ) PORT_DIPSETTING( 0x0e00, DEF_STR( 1C_3C ) ) PORT_DIPSETTING( 0x0600, DEF_STR( 1C_4C ) ) - PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Free_Play ) ) + PORT_DIPNAME( 0x2000, 0x2000, DEF_STR( Free_Play ) ) PORT_DIPSETTING( 0x2000, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) PORT_DIPNAME( 0x4000, 0x0000, DEF_STR( Unused ) ) diff --git a/src/mame/drivers/flstory.cpp b/src/mame/drivers/flstory.cpp index 9ab08722491..19857ca8ba3 100644 --- a/src/mame/drivers/flstory.cpp +++ b/src/mame/drivers/flstory.cpp @@ -440,7 +440,7 @@ static INPUT_PORTS_START( victnine ) PORT_DIPSETTING( 0x20, DEF_STR( Upright ) ) PORT_DIPSETTING( 0xa0, DEF_STR( Cocktail ) ) PORT_DIPSETTING( 0x00, "MA / MB" ) // This is a small single player sit-down cab called 'Taito MA' or 'Taito MB', with only 1 joystick and 3 buttons. - // Only Player 1 can play and only buttons A, C and c are active. + // Only Player 1 can play and only buttons A, C and c are active. PORT_START("SWB") /* D801 */ PORT_DIPNAME( 0x0f, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SWB:1,2,3,4") diff --git a/src/mame/drivers/galivan.cpp b/src/mame/drivers/galivan.cpp index a47523d1f6c..4f815dd7742 100644 --- a/src/mame/drivers/galivan.cpp +++ b/src/mame/drivers/galivan.cpp @@ -121,7 +121,7 @@ void galivan_state::ninjemak_io_map(address_map &map) map(0x83, 0x83).portr("SERVICE"); map(0x84, 0x84).portr("DSW1"); map(0x85, 0x85).portr("DSW2").w(FUNC(galivan_state::galivan_sound_command_w)); - map(0x86, 0x86).w(FUNC(galivan_state::blit_trigger_w)); + map(0x86, 0x86).w(FUNC(galivan_state::blit_trigger_w)); map(0x87, 0x87).w(FUNC(galivan_state::vblank_ack_w)); } @@ -439,7 +439,7 @@ void galivan_state::video_config(machine_config &config) SCREEN(config, m_screen, SCREEN_TYPE_RASTER); // TODO: not measured, ~60 Hz - m_screen->set_raw(XTAL(12'000'000)/2,382,0,32*8, 262, 2*8, 30*8); + m_screen->set_raw(XTAL(12'000'000)/2,382,0,32*8, 262, 2*8, 30*8); m_screen->screen_vblank().set(m_spriteram, FUNC(buffered_spriteram8_device::vblank_copy_rising)); m_screen->set_palette(m_palette); } @@ -465,7 +465,7 @@ void galivan_state::galivan(machine_config &config) m_screen->set_screen_update(FUNC(galivan_state::screen_update_galivan)); GFXDECODE(config, m_gfxdecode, m_palette, gfx_galivan); PALETTE(config, m_palette, FUNC(galivan_state::galivan_palette), 16*16+16*16+256*16, 256); - + /* sound hardware */ SPEAKER(config, "speaker").front_center(); diff --git a/src/mame/drivers/generalplus_gpl32612.cpp b/src/mame/drivers/generalplus_gpl32612.cpp index 07c322b4341..673b112b017 100644 --- a/src/mame/drivers/generalplus_gpl32612.cpp +++ b/src/mame/drivers/generalplus_gpl32612.cpp @@ -4,8 +4,8 @@ /***************************************************************************** - unlike earlier SunPlus / GeneralPlus based SoCs this one seems to be - ARM based + unlike earlier SunPlus / GeneralPlus based SoCs this one seems to be + ARM based *****************************************************************************/ @@ -133,6 +133,6 @@ void generalplus_gpl32612_game_state::nand_init840() // year, name, parent, compat, machine, input, class, init, company, fullname, flags CONS( 200?, jak_tmnthp, 0, 0, gpl32612, gpl32612, generalplus_gpl32612_game_state, nand_init840, "JAKKS Pacific Inc", "Teenage Mutanat Ninja Turtles Hero Portal", MACHINE_IS_SKELETON ) CONS( 200?, jak_swbstrik, 0, 0, gpl32612, gpl32612, generalplus_gpl32612_game_state, nand_init840, "JAKKS Pacific Inc", "Star Wars Blaster Strike", MACHINE_IS_SKELETON ) -// Hero Portal Dreamworks Dragons -// Hero Portal Power Rangers -// Hero Portal DC Super Heroes +// Hero Portal Dreamworks Dragons +// Hero Portal Power Rangers +// Hero Portal DC Super Heroes diff --git a/src/mame/drivers/geniusjr.cpp b/src/mame/drivers/geniusjr.cpp index 3d64d115f4d..117bc9cc7f8 100644 --- a/src/mame/drivers/geniusjr.cpp +++ b/src/mame/drivers/geniusjr.cpp @@ -338,7 +338,7 @@ ROM_START( pitagjr ) ROM_REGION( 0x40000, "extrom", 0 ) ROM_LOAD( "lh532hjt_9811d.u3", 0x00000, 0x40000, CRC(23878b45) SHA1(8f3c41c10cfde9d76763c3a8701ec6616db4ab40) ) - + ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD( "csm10150an.u2", 0x0000, 0x2000, NO_DUMP ) // TSP50C10 (8K bytes of ROM) labeled "CSM10150AN" ROM_END @@ -381,7 +381,7 @@ ROM_START( pitagor ) ROM_REGION( 0x80000, "extrom", 0 ) ROM_LOAD( "27-5374-00.u2", 0x000000, 0x80000, CRC(89a8fe7d) SHA1(dff06f7313af22c6c19b1f00c0651a64cc505fe2)) - + ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD( "csm10150an.u1", 0x0000, 0x2000, NO_DUMP ) // TSP50C10 (8K bytes of ROM) labeled "64C_4TT VIDEO TECH CSM10150AN" ROM_END diff --git a/src/mame/drivers/gkidabc.cpp b/src/mame/drivers/gkidabc.cpp index 8470df24e66..e3aa86c07ad 100644 --- a/src/mame/drivers/gkidabc.cpp +++ b/src/mame/drivers/gkidabc.cpp @@ -45,7 +45,7 @@ ROM_END ROM_START(miprimlec) ROM_REGION(0x20000, "maincpu", 0) ROM_LOAD("27-5482-01.u1", 0x00000, 0x20000, CRC(83aa655b) SHA1(5d7b03f0ff2836e228da77676df03854f87edd26)) - + ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD( "csm10150an.u3", 0x0000, 0x2000, NO_DUMP ) // TSP50C10 (8K bytes of ROM) labeled "67ACLKT VIDEO TECH CSM10150AN" ROM_END diff --git a/src/mame/drivers/lexibook_jg7425.cpp b/src/mame/drivers/lexibook_jg7425.cpp index 482b84ce6a5..c8fecbcb964 100644 --- a/src/mame/drivers/lexibook_jg7425.cpp +++ b/src/mame/drivers/lexibook_jg7425.cpp @@ -55,9 +55,9 @@ private: void lexibook_jg7425_state::machine_start() { // I think this code should be running from RAM at least, probably some kind of bootstrap / internal ROM to copy it? (hyperscan.cpp indicates that SoC can have internal ROM at least) - + // first 0x20 bytes are probably pointers, code starts at 0x20 and is offset, maps at 0x500000 - + for (int i = 0; i < 0x80000 / 4; i++) { m_mainram[i+(0x500000/4) - (0x20/4)] = m_romregion[i]; @@ -101,7 +101,7 @@ void lexibook_jg7425_state::lexibook_jg7425(machine_config &config) ROM_START( lx_jg7425 ) ROM_REGION( 0x200000, "maincpu", ROMREGION_32BIT | ROMREGION_LE ) ROM_LOAD32_DWORD( "mx29lv160.u6", 0x000000, 0x200000, CRC(43c90080) SHA1(4c9e5c8f880d40bd684357ce67ae45c3f5d24b62) ) - + DISK_REGION( "ata:0:hdd:image" ) /* 4GB SD Card */ DISK_IMAGE( "lexibook_jg7425_4gbsd", 0, SHA1(dc0985103edec3992efdd493feef6185daedb3fd) ) ROM_END diff --git a/src/mame/drivers/meritum.cpp b/src/mame/drivers/meritum.cpp index 0e90b64320e..ecf542e0cac 100644 --- a/src/mame/drivers/meritum.cpp +++ b/src/mame/drivers/meritum.cpp @@ -531,7 +531,7 @@ void meritum_state::meritum2(machine_config &config) m_maincpu->set_addrmap(AS_IO, &meritum_state::io_map2); I8255(config, "flopppi", 0); // floppy disk interface m_screen->set_screen_update(FUNC(meritum_state::screen_update_meritum2)); - + } diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp index 1ae0a31f2e3..468cff115eb 100644 --- a/src/mame/drivers/mitchell.cpp +++ b/src/mame/drivers/mitchell.cpp @@ -1686,7 +1686,7 @@ ROM_END ROM_START( pkladiesbl ) ROM_REGION( 0x50000*2, "maincpu", 0 ) - // only 1.ic112 is encrypted (only opcodes). Encryption scheme seems to involve XORs and bitswaps, based on addresses. + // only 1.ic112 is encrypted (only opcodes). Encryption scheme seems to involve XORs and bitswaps, based on addresses. ROM_LOAD( "1.ic112", 0x50000, 0x08000, CRC(ca4cfaf9) SHA1(97ad3c526e4494f347db45c986ba23aff07e6321) ) ROM_CONTINUE(0x00000,0x08000) ROM_LOAD( "2.ic126", 0x60000, 0x10000, CRC(5c73e9b6) SHA1(5fbfb4c79e2df8e1edd3f29ac63f9961dd3724b1) ) diff --git a/src/mame/drivers/namcofl.cpp b/src/mame/drivers/namcofl.cpp index ec19bb340e4..7742e890ac2 100644 --- a/src/mame/drivers/namcofl.cpp +++ b/src/mame/drivers/namcofl.cpp @@ -156,8 +156,8 @@ OSC3: 48.384MHz 13E : HN58C65 EEPROM TODO - finalapr : Some objects aren't displayed, Wrong shadow behavior - speedrcr : Incorrect ROZ layer + finalapr : Some objects aren't displayed, Wrong shadow behavior + speedrcr : Incorrect ROZ layer */ #include "emu.h" diff --git a/src/mame/drivers/namconb1.cpp b/src/mame/drivers/namconb1.cpp index 337977f3f31..7517ede9687 100644 --- a/src/mame/drivers/namconb1.cpp +++ b/src/mame/drivers/namconb1.cpp @@ -888,7 +888,7 @@ static INPUT_PORTS_START( namconb1 ) PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) INPUT_PORTS_END - + /****************************************************************************/ void namconb1_state::init_nebulray() diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp index 20bd6326e0d..a58e34f9b49 100644 --- a/src/mame/drivers/naomi.cpp +++ b/src/mame/drivers/naomi.cpp @@ -8061,14 +8061,14 @@ G-MAIN2 | RTC72423 JP6 | | IC3 52256 52256 315-5338A | | TOS1 JP1 LEDs | -| CR2032 IC2 JP2-5 SW1 SW2 SW3 SW4 | +| CR2032 IC2 JP2-5 SW1 SW2 SW3 SW4 | |------------------------------------------------------------| Notes: MC68360 - Motorola MC68360EM25L 'QUICC' QUad Integrated Communications Controller IC2 - EPR-24482 27C4002 EEPROM (DIP40) IC3 - EEPROM DIP40 (not populated) 4C256K16 - 2x Alliance AS4C256K16F0 256k x16 CMOS DRAM (Fast Page Mode) - 52256 - 2x Sharp LH52256CN-70LL 32k x8 CMOS SRAM + 52256 - 2x Sharp LH52256CN-70LL 32k x8 CMOS SRAM COM20020 - 2x SMsC COM20020ILJP 5Mbps ARCNET controller 315-5296 - 2x Sega I/O ASIC 315-5338A - Sega I/O ASIC diff --git a/src/mame/drivers/nes_vt.cpp b/src/mame/drivers/nes_vt.cpp index 07e3e2d7228..b73784cc91e 100644 --- a/src/mame/drivers/nes_vt.cpp +++ b/src/mame/drivers/nes_vt.cpp @@ -2267,8 +2267,8 @@ ROM_START( mc_tv200 ) ROM_END ROM_START( unkra200 ) // "Winbond 25Q64FVSIG 1324" SPI ROM - ROM_REGION( 0x800000, "mainrom", 0 ) - ROM_LOAD( "retro_machine_rom", 0x00000, 0x800000, CRC(0e824aa7) SHA1(957e98868559ecc22b3fa42c76692417b76bf132) ) + ROM_REGION( 0x800000, "mainrom", 0 ) + ROM_LOAD( "retro_machine_rom", 0x00000, 0x800000, CRC(0e824aa7) SHA1(957e98868559ecc22b3fa42c76692417b76bf132) ) ROM_END ROM_START( fcpocket ) diff --git a/src/mame/drivers/playmark.cpp b/src/mame/drivers/playmark.cpp index 1adc160f6ea..68e75995f4e 100644 --- a/src/mame/drivers/playmark.cpp +++ b/src/mame/drivers/playmark.cpp @@ -76,9 +76,9 @@ A |__ |_MCT1413P_| | |__ ____________ |___| |__ |S87C751-4N24 | |__ ______ | - ___| |XTAL|<-12.000 | + ___| |XTAL|<-12.000 | | |____| | - |__________________________| + |__________________________| TODO: diff --git a/src/mame/drivers/prestige.cpp b/src/mame/drivers/prestige.cpp index 85525613f86..85cb6d7e66b 100644 --- a/src/mame/drivers/prestige.cpp +++ b/src/mame/drivers/prestige.cpp @@ -56,10 +56,10 @@ Notes: | ____ |Z80 | S2564RL-100->| || | ______________ ____ | | | || | | 27-5560-01 | ____ | |<-Z84C0008PEC | || - | |_____________| | | | | __________ |____|| + | |_____________| | | | | __________ |____|| \ | | |____| |_________| ________| - \_____ ____________| | SN74HC244N | - |||||||||||||| |__|||||_____ ___| + \_____ ____________| | SN74HC244N | + |||||||||||||| |__|||||_____ ___| |||||||||||||| ||||||||||| */ @@ -883,7 +883,7 @@ ROM_END ROM_START( pcscolor ) ROM_REGION( 0x100000, "maincpu", 0 ) ROM_LOAD( "27-5560-01.u5", 0x00000, 0x080000, CRC(e21e7ecd) SHA1(f3eeb19a88f1856406b357f2966880113b7340dc) ) - + ROM_REGION( 0x2000, "speech", 0 ) ROM_LOAD( "csm10233an.u1", 0x0000, 0x2000, NO_DUMP ) // TSP50C10 (8K bytes of ROM) labeled "51CTCJT VIDEO TECH CSM10233AN" ROM_END diff --git a/src/mame/drivers/rainbow.cpp b/src/mame/drivers/rainbow.cpp index 70844f5f3df..331443d8df4 100644 --- a/src/mame/drivers/rainbow.cpp +++ b/src/mame/drivers/rainbow.cpp @@ -3391,7 +3391,7 @@ ROM_START(rainbow100a) ROM_LOAD("23-176e4-00.e89", 0xfa000, 0x2000, CRC(405e9619) SHA1(86604dccea84b46e05d705abeda25b12f7cc8c59)) // ROM (FA000-FBFFF) (E89) 8 K ROM_LOAD("23-177e4-00.e90", 0xfc000, 0x2000, CRC(1ec72a66) SHA1(ed19944ae711e97d6bec34c885be04c4c3c95852)) // ROM (FC000-FDFFF) (E90) 8 K - ROM_FILL(0xfa26d, 1, 0x00) // [0xFA000 + 0x026d] disable CRC check [100-A ROM] + ROM_FILL(0xfa26d, 1, 0x00) // [0xFA000 + 0x026d] disable CRC check [100-A ROM] ROM_FILL(0xfadea, 1, 0x00) // [0xFA000 + 0x0dea] Floppy workaround: in case of Z80 RESPONSE FAILURE ($80 bit set in AL), don't block floppy access // SOCKETED LANGUAGE ROM (E91) with 1 single localization per ROM - @@ -3424,7 +3424,7 @@ ROM_START(rainbow) // BOOT ROM ROM_LOAD("23-022e5-00.bin", 0xf0000, 0x4000, CRC(9d1332b4) SHA1(736306d2a36bd44f95a39b36ebbab211cc8fea6e)) ROM_RELOAD(0xf4000, 0x4000) - ROM_FILL(0xf4303, 1, 0x00) // [0xf4000 + 0x0303] disable CRC check [100-B ROM] + ROM_FILL(0xf4303, 1, 0x00) // [0xf4000 + 0x0303] disable CRC check [100-B ROM] ROM_FILL(0xf535e, 1, 0x00) // [0xf4000 + 0x135e] Floppy workaround: in case of Z80 RESPONSE FAILURE ($80 bit set in AL), don't block floppy access diff --git a/src/mame/drivers/riscpc.cpp b/src/mame/drivers/riscpc.cpp index c7726fdb86f..3910ea42127 100644 --- a/src/mame/drivers/riscpc.cpp +++ b/src/mame/drivers/riscpc.cpp @@ -8,11 +8,11 @@ based on work by Tomasz Slanina and Sarah Walker TODO: - - IOMD currently hardwired with ARM7500FE flavour for all machines, needs information about - which uses what; - - PS/2 keyboard doesn't work properly; + - IOMD currently hardwired with ARM7500FE flavour for all machines, needs information about + which uses what; + - PS/2 keyboard doesn't work properly; - Fix pendingUnd fatalerror from ARM7 core; - - Fix pendingAbtD fatalerror for RiscOS 4.xx; + - Fix pendingAbtD fatalerror for RiscOS 4.xx; ****************************************************************************/ @@ -65,7 +65,7 @@ private: void a7000_map(address_map &map); void riscpc_map(address_map &map); - + bool m_i2cmem_clock; DECLARE_READ_LINE_MEMBER(iocr_od0_r); DECLARE_READ_LINE_MEMBER(iocr_od1_r); @@ -196,7 +196,7 @@ void riscpc_state::base_config(machine_config &config) m_vidc->set_screen("screen"); m_vidc->vblank().set(m_iomd, FUNC(arm_iomd_device::vblank_irq)); m_vidc->sound_drq().set(m_iomd, FUNC(arm_iomd_device::sound_drq)); - + m_iomd->set_host_cpu_tag(m_maincpu); m_iomd->set_vidc_tag(m_vidc); m_iomd->set_kbdc_tag(m_kbdc); @@ -209,7 +209,7 @@ void riscpc_state::base_config(machine_config &config) void riscpc_state::rpc600(machine_config &config) { constexpr XTAL cpuxtal(60_MHz_XTAL/2); - + ARM7(config, m_maincpu, cpuxtal); // really ARM610 m_maincpu->set_addrmap(AS_PROGRAM, &riscpc_state::riscpc_map); @@ -252,7 +252,7 @@ void riscpc_state::a7000p(machine_config &config) void riscpc_state::sarpc(machine_config &config) { // TODO: ranges from 160 to 233 MHz - constexpr XTAL cpuxtal(200'000'000); + constexpr XTAL cpuxtal(200'000'000); SA1110(config, m_maincpu, cpuxtal); // StrongARM m_maincpu->set_addrmap(AS_PROGRAM, &riscpc_state::riscpc_map); diff --git a/src/mame/drivers/samcoupe.cpp b/src/mame/drivers/samcoupe.cpp index a95336bd29a..c3fc4bf18fc 100644 --- a/src/mame/drivers/samcoupe.cpp +++ b/src/mame/drivers/samcoupe.cpp @@ -235,7 +235,7 @@ READ8_MEMBER(samcoupe_state::samcoupe_keyboard_r) /* bit 7, external memory */ data |= 1 << 7; - + /* joysticks */ if (!BIT(offset, 12)) data &= m_joy1->read() | (0xff ^ 0x1f); if (!BIT(offset, 11)) data &= m_joy2->read() | (0xff ^ 0x1f); diff --git a/src/mame/drivers/skyfox.cpp b/src/mame/drivers/skyfox.cpp index 27e9099ac1a..ac12ffe7025 100644 --- a/src/mame/drivers/skyfox.cpp +++ b/src/mame/drivers/skyfox.cpp @@ -14,8 +14,8 @@ Other: 2 HM6116LP-3 (one on each board) TODO: - The background rendering is entirely guesswork; -- DMA trigger happens at vpos 24 with legacy video parameters, - needs H/VSync PCB calculations, also notice that 62.65 Hz comes from the +- DMA trigger happens at vpos 24 with legacy video parameters, + needs H/VSync PCB calculations, also notice that 62.65 Hz comes from the bootleg and may be different for original; 2008-07 @@ -64,7 +64,7 @@ void skyfox_state::skyfox_map(address_map &map) map(0xe001, 0xe001).portr("DSW0"); map(0xe002, 0xe002).portr("DSW1"); map(0xe008, 0xe009).w(FUNC(skyfox_state::output_w)); -// map(0xe00a, 0xe00e) // POST only? +// map(0xe00a, 0xe00e) // POST only? map(0xe00f, 0xe00f).nopw(); // DMA trigger map(0xf001, 0xf001).portr("DSW2"); } @@ -223,8 +223,8 @@ void skyfox_state::skyfox(machine_config &config) /* basic machine hardware */ Z80(config, m_maincpu, XTAL(8'000'000)/2); /* Verified at 4MHz */ m_maincpu->set_addrmap(AS_PROGRAM, &skyfox_state::skyfox_map); - // IM0, never enables ei opcode - + // IM0, never enables ei opcode + Z80(config, m_audiocpu, XTAL(14'318'181)/8); /* Verified at 1.789772MHz */ m_audiocpu->set_addrmap(AS_PROGRAM, &skyfox_state::skyfox_sound_map); diff --git a/src/mame/drivers/ssfindo.cpp b/src/mame/drivers/ssfindo.cpp index 26a14c43de2..fe301fe9879 100644 --- a/src/mame/drivers/ssfindo.cpp +++ b/src/mame/drivers/ssfindo.cpp @@ -158,7 +158,7 @@ protected: required_device<arm7500fe_iomd_device> m_iomd; optional_device<i2cmem_device> m_i2cmem; required_region_ptr<uint16_t> m_flashrom; - + void init_common(); virtual void machine_start() override; virtual void machine_reset() override; @@ -194,7 +194,7 @@ private: void ppcar_map(address_map &map); void ssfindo_map(address_map &map); - + DECLARE_READ8_MEMBER(iolines_r); DECLARE_WRITE8_MEMBER(iolines_w); bool m_flash_bank_select; @@ -301,7 +301,7 @@ READ32_MEMBER(ssfindo_state::io_r) { case 0: //bit 0 of IOLINES = flash select ( 5/6 or 3/2 ) - if (m_flash_bank_select) + if (m_flash_bank_select) adr+=0x400000; break; @@ -565,7 +565,7 @@ void ssfindo_state::ssfindo(machine_config &config) m_vidc->set_screen("screen"); m_vidc->vblank().set(m_iomd, FUNC(arm_iomd_device::vblank_irq)); m_vidc->sound_drq().set(m_iomd, FUNC(arm_iomd_device::sound_drq)); - + ARM7500FE_IOMD(config, m_iomd, 54000000); m_iomd->set_host_cpu_tag(m_maincpu); m_iomd->set_vidc_tag(m_vidc); @@ -589,7 +589,7 @@ void tetfight_state::tetfight(machine_config &config) m_maincpu->set_addrmap(AS_PROGRAM, &tetfight_state::tetfight_map); I2C_24C02(config, m_i2cmem); - + m_iomd->iocr_read_od<0>().set(FUNC(tetfight_state::iocr_od0_r)); m_iomd->iocr_read_od<1>().set(FUNC(tetfight_state::iocr_od1_r)); m_iomd->iocr_write_od<0>().set(FUNC(tetfight_state::iocr_od0_w)); diff --git a/src/mame/drivers/sunplus_gcm394.cpp b/src/mame/drivers/sunplus_gcm394.cpp index 1268a646a7e..46e1df81787 100644 --- a/src/mame/drivers/sunplus_gcm394.cpp +++ b/src/mame/drivers/sunplus_gcm394.cpp @@ -6,26 +6,26 @@ Compared to vii.cpp this is clearly newer, has extra opcodes, different internal map etc. also scaling and higher resolutions based on Spongebob - GPL600 + GPL600 Smart Fit Park SpongeBob SquarePants Bikini Bottom 500 Spiderman - The Masked Menace 'Spider Sense' (pad type with Spiderman model) (Wireless Hunting? - maybe, register map looks the same even if it sets stack to 2fff not 6fff) - GPL800 (== GPL600 with NAND support + maybe more) - Wireless Air 60 - Golden Tee Golf - Cars 2 - Toy Story Mania - V.Baby - Playskool Heroes Transformers Rescue Bots Beam Box + GPL800 (== GPL600 with NAND support + maybe more) + Wireless Air 60 + Golden Tee Golf + Cars 2 + Toy Story Mania + V.Baby + Playskool Heroes Transformers Rescue Bots Beam Box - GPL500 (unknown, might be GPL600 but without the higher resolution support?) - The Price is Right - Bejeweled? (might be GPL600) + GPL500 (unknown, might be GPL600 but without the higher resolution support?) + The Price is Right + Bejeweled? (might be GPL600) - Notes - smartfp: hold button Circle, Star and Home on startup for Test Menu + Notes + smartfp: hold button Circle, Star and Home on startup for Test Menu these are both unsp 2.0 type, as they use the extended ocpodes */ @@ -390,7 +390,7 @@ static INPUT_PORTS_START( gcm394 ) PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_CODE(KEYCODE_OPENBRACE) PORT_NAME("10") PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON16 ) PORT_CODE(KEYCODE_CLOSEBRACE) PORT_NAME("11") - PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_A) PORT_NAME("Circle / Red") + PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CODE(KEYCODE_A) PORT_NAME("Circle / Red") PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CODE(KEYCODE_S) PORT_NAME("Square / Orange") PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_D) PORT_NAME("Triangle / Yellow") PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_CODE(KEYCODE_F) PORT_NAME("Star / Blue") @@ -551,7 +551,7 @@ static INPUT_PORTS_START( jak_gtg ) PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) - PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) + PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Unknown ) ) PORT_DIPSETTING( 0x0080, DEF_STR( Off ) ) PORT_DIPSETTING( 0x0000, DEF_STR( On ) ) @@ -827,16 +827,16 @@ void generalplus_gpac800_game_state::machine_reset() // note, these patch the code copied to SRAM so the 'PROGRAM ROM' check fails (it passes otherwise) if (mem.read_word(0x3f368) == 0x4840) - mem.write_word(0x3f368, 0x4841); // cars 2 IRQ? wait hack + mem.write_word(0x3f368, 0x4841); // cars 2 IRQ? wait hack if (mem.read_word(0x4368c) == 0x4846) - mem.write_word(0x4368c, 0x4840); // cars 2 force service mode + mem.write_word(0x4368c, 0x4840); // cars 2 force service mode if (mem.read_word(0x4d8d4) == 0x4840) - mem.write_word(0x4d8d4, 0x4841); // golden tee IRQ? wait hack + mem.write_word(0x4d8d4, 0x4841); // golden tee IRQ? wait hack if (mem.read_word(0x34410) == 0x4846) - mem.write_word(0x34410, 0x4840); // golden tee force service mode + mem.write_word(0x34410, 0x4840); // golden tee force service mode m_maincpu->reset(); // reset CPU so vector gets read etc. diff --git a/src/mame/drivers/taitopjc.cpp b/src/mame/drivers/taitopjc.cpp index 95c670c54a3..e7606b904e0 100644 --- a/src/mame/drivers/taitopjc.cpp +++ b/src/mame/drivers/taitopjc.cpp @@ -875,7 +875,7 @@ ROM_START( optiger ) ROM_LOAD( "e63-05_palce16v8h-10-4.ic36", 0x3f4, 0x117, CRC(e27e9734) SHA1(77dadfbedb625b65617640bb73c59c9e5b0c927f) ) ROM_LOAD( "e63-06_palce16v8h-10-4.ic41", 0x50b, 0x117, CRC(75184422) SHA1(d35e98e0278d713139eb1c833f41f57ed0dd3c9f) ) ROM_LOAD( "e63-07_palce16v8h-10-4.ic43", 0x622, 0x117, CRC(eb77b03f) SHA1(567f92a4fd1fa919d5e9047ee15c058bf40855fb) ) - ROM_LOAD( "e63-08_palce16v8h-15-4.ic49", 0x739, 0x117, CRC(c305c56d) SHA1(49592fa43c548ac6b08951d03677a3f23e9c8de8) ) + ROM_LOAD( "e63-08_palce16v8h-15-4.ic49", 0x739, 0x117, CRC(c305c56d) SHA1(49592fa43c548ac6b08951d03677a3f23e9c8de8) ) ROM_END GAME( 1998, optiger, 0, taitopjc, taitopjc, taitopjc_state, init_optiger, ROT0, "Taito", "Operation Tiger (Ver 2.14 O)", MACHINE_NOT_WORKING | MACHINE_NO_SOUND ) diff --git a/src/mame/drivers/triforce.cpp b/src/mame/drivers/triforce.cpp index db62b352c7f..b795ac38cac 100644 --- a/src/mame/drivers/triforce.cpp +++ b/src/mame/drivers/triforce.cpp @@ -1162,7 +1162,7 @@ ROM_END // For instance, the dump of mkartagp skips two blocks in its lookup list, and the 16 'lanes' in the // 0x78020-0x7802f area are 00 except for two values, which are 1. The corresponding two skipped blocks // in the flash area are all zero/unused. -// Likewise, with mkartagp2, there are three 1 value and one 2 values in the table, +// Likewise, with mkartagp2, there are three 1 value and one 2 values in the table, // and mkartagp2 skips 5 blocks in its mapping table. // * 0x79ffc-0x79fff contains what may be a checksum of the 0x78000-0x79ffb area? unclear. diff --git a/src/mame/drivers/v0bowl.cpp b/src/mame/drivers/v0bowl.cpp index 5e4dbe86db7..0ef0727ed13 100644 --- a/src/mame/drivers/v0bowl.cpp +++ b/src/mame/drivers/v0bowl.cpp @@ -2,10 +2,10 @@ // copyright-holders:Angelo Salese /*************************************************************************** - "Unknown VRender0+ Bowling Game" (c) 200x A1 Amusement One + "Unknown VRender0+ Bowling Game" (c) 200x A1 Amusement One - TODO: - - checkout the actual SanDisk device + TODO: + - checkout the actual SanDisk device ***************************************************************************/ @@ -21,24 +21,24 @@ class v0bowl_state : public driver_device { public: - v0bowl_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag) - , m_maincpu(*this, "maincpu") - , m_vr0soc(*this, "vr0soc") + v0bowl_state(const machine_config &mconfig, device_type type, const char *tag) + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_vr0soc(*this, "vr0soc") {} - void v0bowl(machine_config &config); + void v0bowl(machine_config &config); protected: - // driver_device overrides - virtual void machine_start() override; - virtual void machine_reset() override; + // driver_device overrides + virtual void machine_start() override; + virtual void machine_reset() override; private: - void v0bowl_map(address_map &map); + void v0bowl_map(address_map &map); - // devices - required_device<cpu_device> m_maincpu; + // devices + required_device<cpu_device> m_maincpu; required_device<vrender0soc_device> m_vr0soc; IRQ_CALLBACK_MEMBER(icallback); @@ -62,64 +62,64 @@ void v0bowl_state::v0bowl_map(address_map &map) map(0x02000000, 0x027fffff).ram().share("workram"); map(0x03000000, 0x04ffffff).m(m_vr0soc, FUNC(vrender0soc_device::audiovideo_map)); -// map(0x05000000, 0x0500000f) SanDisk +// map(0x05000000, 0x0500000f) SanDisk } static INPUT_PORTS_START( v0bowl ) - /* dummy active high structure */ - PORT_START("SYSA") - PORT_DIPNAME( 0x01, 0x00, "SYSA" ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x01, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x02, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x04, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x08, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x10, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x20, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x40, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x80, DEF_STR( On ) ) - - /* dummy active low structure */ - PORT_START("DSWA") - PORT_DIPNAME( 0x01, 0x01, "DSWA" ) - PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) - PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) - PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) - PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + /* dummy active high structure */ + PORT_START("SYSA") + PORT_DIPNAME( 0x01, 0x00, "SYSA" ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x01, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x02, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x04, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x08, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x10, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x20, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x40, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x00, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x80, DEF_STR( On ) ) + + /* dummy active low structure */ + PORT_START("DSWA") + PORT_DIPNAME( 0x01, 0x01, "DSWA" ) + PORT_DIPSETTING( 0x01, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x02, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x04, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x08, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x10, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x20, 0x20, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x20, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x40, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) + PORT_DIPNAME( 0x80, 0x80, DEF_STR( Unknown ) ) + PORT_DIPSETTING( 0x80, DEF_STR( Off ) ) + PORT_DIPSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END void v0bowl_state::machine_start() @@ -152,11 +152,11 @@ void v0bowl_state::v0bowl(machine_config &config) ROM_START( v0bowl ) ROM_REGION32_LE( 0x1000000, "ipl", ROMREGION_ERASEFF ) - ROM_LOAD( "bootrom.u16", 0x000000, 0x080000, CRC(f8f4cf22) SHA1(881d8eeb6f50b2e7933e7c3c93adcdd0c1e93e77) ) + ROM_LOAD( "bootrom.u16", 0x000000, 0x080000, CRC(f8f4cf22) SHA1(881d8eeb6f50b2e7933e7c3c93adcdd0c1e93e77) ) ROM_REGION32_LE( 0x20000000, "flash", ROMREGION_ERASEFF ) // SanDisk CF // zipped FAT16, filesystem was made with DOS 3.31 but the folders have Windows Thumbs.db files as well. - ROM_LOAD( "bowling.001", 0x000000, 0x1e8be000, BAD_DUMP CRC(aebb2b01) SHA1(cd11f74f6512350ac10f822937b8769f552aabf3) ) + ROM_LOAD( "bowling.001", 0x000000, 0x1e8be000, BAD_DUMP CRC(aebb2b01) SHA1(cd11f74f6512350ac10f822937b8769f552aabf3) ) ROM_END GAME( 200?, v0bowl, 0, v0bowl, v0bowl, v0bowl_state, empty_init, ROT0, "A1 Amusement One", "unknown VRender0+ bowling game", MACHINE_IS_SKELETON ) // Return Bowl? diff --git a/src/mame/etc/template_driver.cpp b/src/mame/etc/template_driver.cpp index ca62f2a11d2..cb7dc988d5a 100644 --- a/src/mame/etc/template_driver.cpp +++ b/src/mame/etc/template_driver.cpp @@ -165,7 +165,7 @@ void xxx_state::xxx(machine_config &config) screen.set_palette(m_palette); GFXDECODE(config, "gfxdecode", m_palette, gfx_xxx); - + PALETTE(config, m_palette, FUNC(xxx_state::xxx_palette), 8); /* sound hardware */ diff --git a/src/mame/includes/nforcepc.h b/src/mame/includes/nforcepc.h index aced8ad9b7c..573d7c2fed0 100644 --- a/src/mame/includes/nforcepc.h +++ b/src/mame/includes/nforcepc.h @@ -261,17 +261,17 @@ private: } mode; enum LogicalDevice { - FDC = 0, // Floppy disk controller - Parallel, // Parallel port - Serial1, // Serial port 1 - Serial2, // Serial port 2 - Keyboard = 5, // Keyboard controller - ConsumerIR, // Consumer IR - Gpio1, // Game port, MIDI, GPIO set 1 - Gpio2, // GPIO set 2 - Gpio34, // GPIO set 3 and 4 - ACPI, // ACPI - Gpio567 = 12 // GPIO set 5, 6 and 7 + FDC = 0, // Floppy disk controller + Parallel, // Parallel port + Serial1, // Serial port 1 + Serial2, // Serial port 2 + Keyboard = 5, // Keyboard controller + ConsumerIR, // Consumer IR + Gpio1, // Game port, MIDI, GPIO set 1 + Gpio2, // GPIO set 2 + Gpio34, // GPIO set 3 and 4 + ACPI, // ACPI + Gpio567 = 12 // GPIO set 5, 6 and 7 }; int config_key_step; int config_index; diff --git a/src/mame/machine/model1.cpp b/src/mame/machine/model1.cpp index 66185ad8849..bbb63eb7314 100644 --- a/src/mame/machine/model1.cpp +++ b/src/mame/machine/model1.cpp @@ -239,20 +239,20 @@ READ32_MEMBER(model1_state::copro_atan_r) // Correct for table bug, it seems that the hardware does something equivalent somehow, // or maybe there are boards with updated opr roms - u16 dt = (result >> 16) + result; - if(dt & 0x001) { + u16 dt = (result >> 16) + result; + if(dt & 0x001) { if((result & 0x00f) == 0x00e) result -= 0x00000001; else result -= 0x00010000; } - if(dt & 0x010) { + if(dt & 0x010) { if((result & 0x0f0) == 0x0e0) result -= 0x00000010; else result -= 0x00100000; } - if(dt & 0x100) { + if(dt & 0x100) { if((result & 0xf00) == 0xe00) result -= 0x00000100; else diff --git a/src/mame/machine/nb1414m4.cpp b/src/mame/machine/nb1414m4.cpp index 2f6883fac5f..2967ceb58bd 100644 --- a/src/mame/machine/nb1414m4.cpp +++ b/src/mame/machine/nb1414m4.cpp @@ -6,12 +6,12 @@ Nichibutsu 1414M4 device emulation Written by Angelo Salese, based on researches by Tomasz Slanina with Legion -This is some fancy blitter DMA or MCU or even a discrete structure that copies text strings to a 8-bit text layer in +This is some fancy blitter DMA or MCU or even a discrete structure that copies text strings to a 8-bit text layer in various Nihon Bussan games; TODO: -- Identify what exactly this "device" is; -- The overlying text layer should actually be a base device for this (and used where not applicable like galivan, +- Identify what exactly this "device" is; +- The overlying text layer should actually be a base device for this (and used where not applicable like galivan, armedf and bigfightr); - Command triggering condition not understood (and diverges between galivan.cpp and armedf.cpp); - where is the condition that makes "insert coin" text to properly blink? @@ -333,7 +333,7 @@ void nb1414m4_device::_0e00(uint16_t mcu_cmd, uint8_t *vram) void nb1414m4_device::vblank_trigger() { // TODO: use this for frame number synchronization instead of screen().frame_number() - // real HW references definitely syncs insert coin blinking after POST so whatever is the host actually + // real HW references definitely syncs insert coin blinking after POST so whatever is the host actually // have an interest over vblank signal. } diff --git a/src/mame/machine/xbox_pci.cpp b/src/mame/machine/xbox_pci.cpp index 1aecb382084..5dc8a0b8862 100644 --- a/src/mame/machine/xbox_pci.cpp +++ b/src/mame/machine/xbox_pci.cpp @@ -462,21 +462,21 @@ void mcpx_isalpc_device::set_virtual_line(int line, int state) return; } /* Will be updated to support dma - line = line - 16; - if (line < 4) - { - switch (line) - { - case 0: - break; - case 1: - break; - case 2: - break; - case 3: - break; - } - } + line = line - 16; + if (line < 4) + { + switch (line) + { + case 0: + break; + case 1: + break; + case 2: + break; + case 3: + break; + } + } */ } diff --git a/src/mame/video/apple2.cpp b/src/mame/video/apple2.cpp index a42a1f3e2c4..49dc2408b59 100644 --- a/src/mame/video/apple2.cpp +++ b/src/mame/video/apple2.cpp @@ -985,7 +985,7 @@ void a2_video_device::hgr_update_tk2000(screen_device &screen, bitmap_ind16 &bit } break; - case 1: + case 1: w >>= 7; if (vram_row[col] & 0x80) { @@ -1142,8 +1142,8 @@ void a2_video_device::dhgr_update(screen_device &screen, bitmap_ind16 &bitmap, c } /* - Latest Apple II NTSC palette from "Apple II Video Display Theory" - https://docs.google.com/spreadsheets/d/1rKR6A_bVniSCtIP_rrv8QLWJdj4h6jEU1jJj0AebWwg/ + Latest Apple II NTSC palette from "Apple II Video Display Theory" + https://docs.google.com/spreadsheets/d/1rKR6A_bVniSCtIP_rrv8QLWJdj4h6jEU1jJj0AebWwg/ */ static const rgb_t apple2_palette[] = { diff --git a/src/mame/video/galivan.cpp b/src/mame/video/galivan.cpp index 28f6c367257..bddac18114f 100644 --- a/src/mame/video/galivan.cpp +++ b/src/mame/video/galivan.cpp @@ -196,7 +196,7 @@ TILE_GET_INFO_MEMBER(galivan_state::ninjemak_get_tx_tile_info) // TODO: skip drawing the NB1414M4 params, how the HW actually handles this? if (index < 0x12) index = 0x12; - + int attr = m_videoram[index + 0x400]; int code = m_videoram[index] | ((attr & 0x03) << 8); SET_TILE_INFO_MEMBER(0, diff --git a/src/mame/video/ms32_sprite.cpp b/src/mame/video/ms32_sprite.cpp index 0a98f2cddd1..88526a0780e 100644 --- a/src/mame/video/ms32_sprite.cpp +++ b/src/mame/video/ms32_sprite.cpp @@ -3,13 +3,13 @@ /* Jaleco Megasystem 32 sprite hardware - TODO: - verify hardware configuration + TODO: + verify hardware configuration used by: ms32.cpp - bnstars.cpp (Dual screen configuration) - tetrisp2.cpp (Slightly different - no zoom, etc) + bnstars.cpp (Dual screen configuration) + tetrisp2.cpp (Slightly different - no zoom, etc) Sprite format (16 byte per each sprite): Offset Bits Description diff --git a/src/mame/video/skyfox.cpp b/src/mame/video/skyfox.cpp index 0d42c6f23bc..80a79461e0e 100644 --- a/src/mame/video/skyfox.cpp +++ b/src/mame/video/skyfox.cpp @@ -217,7 +217,7 @@ void skyfox_state::draw_background(bitmap_ind16 &bitmap, const rectangle &clipre This PCB seems does not support background flip. */ /* This looks perfect at first glance. - but when strict compared on "1UP START" screen, + but when strict compared on "1UP START" screen, it seems the blinking pattern in each star may be different. */ if (((m_bg_ctrl >> 4) & 3) != (pen & 3) || !blinking) bitmap.pix16(y % 256, x % 512) = pen; diff --git a/src/mame/video/tecmosys.cpp b/src/mame/video/tecmosys.cpp index 53c43e887ed..a5947d49b89 100644 --- a/src/mame/video/tecmosys.cpp +++ b/src/mame/video/tecmosys.cpp @@ -41,24 +41,24 @@ void tecmosys_state::render_sprites_to_bitmap(const rectangle &cliprect, u16 ext for (int i = (m_spritelist * 0x4000) / 2; i < ((m_spritelist + 1) * 0x4000) / 2; i += 8) { /* - sprite format (16 bytes per each sprite) - fedcba98 76543210 - 00 ------xx xxxxxxxx X position (10 bit signed) - 02 -------x xxxxxxxx Y position (9 bit signed) - 04 ----iiii ffffffff Zoom X (add destination X position per each X counter, 4.8(8.8?) fixed point)* - 06 ----iiii ffffffff Zoom Y (add destination Y position per each Y counter, 4.8(8.8?) fixed point)* - 08 x------- -------- Disable this sprite - --xxxxxx -------- Palette select (256 color each) - -------- x------- Flip Y - -------- -x------ Flip X - -------- --xx---- Priority - -------- ----xxxx ROM offset MSB - 0a xxxxxxxx xxxxxxxx ROM offset LSB (256 byte each) - 0c xxxxxxxx -------- Source Width (16 pixel each) - -------- xxxxxxxx Source Height (16 pixel each) - 0e -------- -------- Unused - - * : i = integer value, f = fraction value + sprite format (16 bytes per each sprite) + fedcba98 76543210 + 00 ------xx xxxxxxxx X position (10 bit signed) + 02 -------x xxxxxxxx Y position (9 bit signed) + 04 ----iiii ffffffff Zoom X (add destination X position per each X counter, 4.8(8.8?) fixed point)* + 06 ----iiii ffffffff Zoom Y (add destination Y position per each Y counter, 4.8(8.8?) fixed point)* + 08 x------- -------- Disable this sprite + --xxxxxx -------- Palette select (256 color each) + -------- x------- Flip Y + -------- -x------ Flip X + -------- --xx---- Priority + -------- ----xxxx ROM offset MSB + 0a xxxxxxxx xxxxxxxx ROM offset LSB (256 byte each) + 0c xxxxxxxx -------- Source Width (16 pixel each) + -------- xxxxxxxx Source Height (16 pixel each) + 0e -------- -------- Unused + + * : i = integer value, f = fraction value */ if (m_spriteram[i+4] & 0x8000) |
