From 31a13d70e9cce43186d5f2b625bb32c81e90a02b Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 3 Nov 2023 03:30:41 +1100 Subject: Cleaned up some recent commits. Only functional change is nltool counting lines from 1 rather than zero to match text editors. --- src/devices/bus/nabupc/fdc.cpp | 5 ++++- src/devices/bus/nubus/8lc.cpp | 3 ++- src/devices/cpu/evolution/evod.cpp | 2 +- src/devices/cpu/evolution/evod.h | 2 +- src/lib/formats/nabupc_dsk.cpp | 8 ++++---- src/lib/netlist/tools/nl_convert.cpp | 10 +++++----- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/devices/bus/nabupc/fdc.cpp b/src/devices/bus/nabupc/fdc.cpp index 65afae9d2cd..c8d91aa7fb3 100644 --- a/src/devices/bus/nabupc/fdc.cpp +++ b/src/devices/bus/nabupc/fdc.cpp @@ -9,10 +9,12 @@ #include "emu.h" #include "fdc.h" -#include "formats/nabupc_dsk.h" #include "imagedev/floppy.h" #include "machine/wd_fdc.h" +#include "formats/nabupc_dsk.h" + + //************************************************************************** // NABU PC FDC DEVICE //************************************************************************** @@ -39,6 +41,7 @@ protected: // optional information overrides virtual void device_add_mconfig(machine_config &config) override; + private: void ds_w(uint8_t data); diff --git a/src/devices/bus/nubus/8lc.cpp b/src/devices/bus/nubus/8lc.cpp index 5a42d967f82..2e326def9d0 100644 --- a/src/devices/bus/nubus/8lc.cpp +++ b/src/devices/bus/nubus/8lc.cpp @@ -36,9 +36,10 @@ #include "emu.h" #include "8lc.h" +#include "video/tms34061.h" + #include "emupal.h" #include "screen.h" -#include "video/tms34061.h" #define LOG_REGISTERS (1U << 1) #define LOG_RAMDAC (1U << 2) diff --git a/src/devices/cpu/evolution/evod.cpp b/src/devices/cpu/evolution/evod.cpp index 3372a1f6fc2..65315c9c64b 100644 --- a/src/devices/cpu/evolution/evod.cpp +++ b/src/devices/cpu/evolution/evod.cpp @@ -97,7 +97,7 @@ offs_t evolution_disassembler::disassemble(std::ostream &stream, offs_t pc, cons while((opcode & instructions[i].mask) != instructions[i].value) i++; - instructions[i].fct(stream, opcode, instructions[i].size >= 2 ? opcodes.r16(pc+1) : 0, pc); + instructions[i].fct(stream, opcode, (instructions[i].size >= 2) ? opcodes.r16(pc+1) : 0, pc); return instructions[i].size; } diff --git a/src/devices/cpu/evolution/evod.h b/src/devices/cpu/evolution/evod.h index 95a05e31eb7..94f49022205 100644 --- a/src/devices/cpu/evolution/evod.h +++ b/src/devices/cpu/evolution/evod.h @@ -24,7 +24,7 @@ private: u16 value; u16 mask; int size; - std::function fct; + void (*fct)(std::ostream &, u16, u16, u32); }; static const char *const regs[]; diff --git a/src/lib/formats/nabupc_dsk.cpp b/src/lib/formats/nabupc_dsk.cpp index c28d9f1ad3b..79d67a5e25f 100644 --- a/src/lib/formats/nabupc_dsk.cpp +++ b/src/lib/formats/nabupc_dsk.cpp @@ -23,17 +23,17 @@ const nabupc_format::format nabupc_format::formats[] = { // 200k 40 track single sided double density (nabu) floppy_image::FF_525, floppy_image::SSDD, 40, 1, 32, 22, 80, - {0x00, 0x28, 0x00, 0x03, 0x07, 0x00, 0xC2, 0x00, 0x5F, 0x00, 0xE0, 0x00, 0x00, 0x18, 0x01, 0x00, 0x03, 0x07} + {0x00, 0x28, 0x00, 0x03, 0x07, 0x00, 0xc2, 0x00, 0x5f, 0x00, 0xe0, 0x00, 0x00, 0x18, 0x01, 0x00, 0x03, 0x07} }, { // 400k 40 track double sided double density (nabu) floppy_image::FF_525, floppy_image::DSDD, 40, 2, 32, 22, 80, - {0x01, 0x28, 0x00, 0x04, 0x0F, 0x01, 0xC4, 0x00, 0xBF, 0x00, 0xE0, 0x00, 0x00, 0x30, 0x01, 0x00, 0x03, 0x07} + {0x01, 0x28, 0x00, 0x04, 0x0f, 0x01, 0xc4, 0x00, 0xbf, 0x00, 0xe0, 0x00, 0x00, 0x30, 0x01, 0x00, 0x03, 0x07} }, { // 800k 80 track double sided double density (nabu) floppy_image::FF_35, floppy_image::DSDD, 80, 2, 32, 22, 80, - {0x02, 0x28, 0x00, 0x04, 0x0F, 0x00, 0x8C, 0x01, 0x7F, 0x01, 0xFC, 0x00, 0x00, 0x61, 0x01, 0x00, 0x03, 0x07} + {0x02, 0x28, 0x00, 0x04, 0x0f, 0x00, 0x8c, 0x01, 0x7f, 0x01, 0xfc, 0x00, 0x00, 0x61, 0x01, 0x00, 0x03, 0x07} }, {} }; @@ -213,7 +213,7 @@ const char *nabupc_format::name() const noexcept const char *nabupc_format::description() const noexcept { - return "NABU PC CPM Disk Image"; + return "NABU PC CP/M Disk Image"; } const char *nabupc_format::extensions() const noexcept diff --git a/src/lib/netlist/tools/nl_convert.cpp b/src/lib/netlist/tools/nl_convert.cpp index ecd6ca79259..acffed63a46 100644 --- a/src/lib/netlist/tools/nl_convert.cpp +++ b/src/lib/netlist/tools/nl_convert.cpp @@ -333,17 +333,17 @@ double nl_convert_base_t::get_sp_val(const pstring &sin) const void nl_convert_spice_t::convert_block(const str_list &contents) { - int linenumber = 0; + int linenumber = 1; for (const auto &line : contents) { try { process_line(line); } - catch (plib::pexception &e) + catch (const plib::pexception &e) { fprintf(stderr, "Error on line: <%d>\n", linenumber); - throw(e); + throw; } linenumber++; } @@ -528,13 +528,13 @@ void nl_convert_spice_t::process_line(const pstring &line) else if (plib::startsWith(tt[0], "RA")) { val = get_sp_val(tt.back()); - for( unsigned int res = 2; res < tt.size(); res++) + for (unsigned int res = 2; res < tt.size(); res++) { pstring devname = plib::pfmt("{}.{}")(tt[0], res); add_device("RES", devname, val); add_term(tt[1], devname); add_term(tt[res], devname); - } + } } else { -- cgit v1.2.3