Skip to content

Commit dac3a10

Browse files
committed
Cleaned up various stuff.
1 parent fbb446e commit dac3a10

File tree

14 files changed

+684
-672
lines changed

14 files changed

+684
-672
lines changed

src/devices/bus/heathzenith/h89/z_89_11.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,6 @@ ioport_constructor z_89_11_device::device_input_ports() const
319319
return INPUT_PORTS_NAME(z_89_11_device);
320320
}
321321

322-
}
322+
} // anonymous namespace
323323

324324
DEFINE_DEVICE_TYPE_PRIVATE(H89BUS_Z_89_11, device_h89bus_right_card_interface, z_89_11_device, "z_89_11", "Heath/Zenith Z-89-11 Multi-Function I/O Card");

src/devices/bus/hp_dio/hp98628_9.cpp

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
#include "machine/z80sio.h"
4747

4848
// Debugging
49-
#undef VERBOSE
50-
#define VERBOSE 0
49+
//#define VERBOSE 1
5150
#include "logmacro.h"
5251

5352
namespace {
@@ -154,7 +153,7 @@ class base_98628_9_device :
154153
bool m_rt_in;
155154
uint8_t m_modem_ctrl;
156155
uint8_t m_modem_status;
157-
uint8_t m_low_ram[ LOW_RAM_SIZE ];
156+
uint8_t m_low_ram[LOW_RAM_SIZE];
158157
};
159158

160159
base_98628_9_device::base_98628_9_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock)
@@ -385,14 +384,16 @@ void base_98628_9_device::cpu_io_mem_map(address_map &map)
385384

386385
void base_98628_9_device::install_68k_map(offs_t base_addr)
387386
{
388-
dio().install_memory(0x0000 + base_addr,
389-
0x0007 + base_addr,
390-
read16sm_delegate(*this, [this](offs_t addr) { return reg_r(addr); }, ""),
391-
write16sm_delegate(*this, [this](offs_t addr, uint16_t data) { reg_w(addr, uint8_t(data)); }, ""));
392-
dio().install_memory(0x4000 + base_addr,
393-
0x7fff + base_addr,
394-
read16sm_delegate(*this, FUNC(base_98628_9_device::low_ram_r_68k)),
395-
write16sm_delegate(*this, FUNC(base_98628_9_device::low_ram_w_68k)));
387+
dio().install_memory(
388+
0x0000 + base_addr,
389+
0x0007 + base_addr,
390+
read16sm_delegate(*this, NAME([this] (offs_t addr) { return reg_r(addr); })),
391+
write16sm_delegate(*this, NAME([this] (offs_t addr, uint16_t data) { reg_w(addr, uint8_t(data)); })));
392+
dio().install_memory(
393+
0x4000 + base_addr,
394+
0x7fff + base_addr,
395+
read16sm_delegate(*this, FUNC(base_98628_9_device::low_ram_r_68k)),
396+
write16sm_delegate(*this, FUNC(base_98628_9_device::low_ram_w_68k)));
396397
}
397398

398399
uint8_t base_98628_9_device::reg_r(offs_t addr)
@@ -503,7 +504,7 @@ uint8_t base_98628_9_device::low_ram_r_z80(offs_t addr)
503504
m_sio->ctsb_w(m_ctsb);
504505
LOG("CTSB 0\n");
505506
}
506-
return m_low_ram[ addr & (LOW_RAM_SIZE - 1) ];
507+
return m_low_ram[addr & (LOW_RAM_SIZE - 1)];
507508
}
508509

509510
uint16_t base_98628_9_device::low_ram_r_68k(offs_t addr)
@@ -514,7 +515,7 @@ uint16_t base_98628_9_device::low_ram_r_68k(offs_t addr)
514515
update_irq();
515516
LOG("IRQ 0\n");
516517
}
517-
return m_low_ram[ addr & (LOW_RAM_SIZE - 1) ];
518+
return m_low_ram[addr & (LOW_RAM_SIZE - 1)];
518519
}
519520

520521
void base_98628_9_device::low_ram_w_z80(offs_t addr, uint8_t data)
@@ -525,7 +526,7 @@ void base_98628_9_device::low_ram_w_z80(offs_t addr, uint8_t data)
525526
LOG("IRQ 1\n");
526527
update_irq();
527528
}
528-
m_low_ram[ addr & (LOW_RAM_SIZE - 1) ] = data;
529+
m_low_ram[addr & (LOW_RAM_SIZE - 1)] = data;
529530
}
530531

531532
void base_98628_9_device::low_ram_w_68k(offs_t addr, uint16_t data)
@@ -536,7 +537,7 @@ void base_98628_9_device::low_ram_w_68k(offs_t addr, uint16_t data)
536537
LOG("CTSB 1\n");
537538
m_sio->ctsb_w(m_ctsb);
538539
}
539-
m_low_ram[ addr & (LOW_RAM_SIZE - 1) ] = uint8_t(data);
540+
m_low_ram[addr & (LOW_RAM_SIZE - 1)] = uint8_t(data);
540541
}
541542

542543
uint8_t base_98628_9_device::sio_r(offs_t addr)
@@ -873,7 +874,7 @@ class dio16_98629_device :
873874
bool m_tx;
874875
bool m_last_tt;
875876
uint8_t m_sr;
876-
uint8_t m_high_ram[ HIGH_RAM_SIZE ];
877+
uint8_t m_high_ram[HIGH_RAM_SIZE];
877878
};
878879

879880
void dio16_98629_device::device_start()
@@ -995,20 +996,21 @@ void dio16_98629_device::cpu_program_mem_map(address_map &map)
995996
void dio16_98629_device::install_68k_map(offs_t base_addr)
996997
{
997998
base_98628_9_device::install_68k_map(base_addr);
998-
dio().install_memory(0x8000 + base_addr,
999-
0xbfff + base_addr,
1000-
read16sm_delegate(*this, [this](offs_t addr) { return high_ram_r_z80(addr); }, ""),
1001-
write16sm_delegate(*this, [this](offs_t addr, uint16_t data) { high_ram_w_z80(addr, uint8_t(data)); }, ""));
999+
dio().install_memory(
1000+
0x8000 + base_addr,
1001+
0xbfff + base_addr,
1002+
read16sm_delegate(*this, NAME([this] (offs_t addr) { return high_ram_r_z80(addr); })),
1003+
write16sm_delegate(*this, NAME([this] (offs_t addr, uint16_t data) { high_ram_w_z80(addr, uint8_t(data)); })));
10021004
}
10031005

10041006
uint8_t dio16_98629_device::high_ram_r_z80(offs_t addr)
10051007
{
1006-
return m_high_ram[ addr & (HIGH_RAM_SIZE - 1) ];
1008+
return m_high_ram[addr & (HIGH_RAM_SIZE - 1)];
10071009
}
10081010

10091011
void dio16_98629_device::high_ram_w_z80(offs_t addr, uint8_t data)
10101012
{
1011-
m_high_ram[ addr & (HIGH_RAM_SIZE - 1) ] = data;
1013+
m_high_ram[addr & (HIGH_RAM_SIZE - 1)] = data;
10121014
}
10131015

10141016
void dio16_98629_device::tx_out(int state)

src/devices/cpu/mpk1839/kl1839vm1.cpp

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
// copyright-holders:Andrei I. Holub
33

44
#include "emu.h"
5-
65
#include "kl1839vm1.h"
76
#include "kl1839vm1dasm.h"
7+
88
#include "cpu/vax/vaxdasm.h"
9+
10+
#include <algorithm>
911
#include <regex>
1012

1113

@@ -132,7 +134,7 @@ u32 kl1839vm1_device::shr(u32 val, bool va, u8 fo, bool a_c, bool l_r)
132134
void kl1839vm1_device::kop(u8 kop, u8 fd, u32 x, u32 y, u8 rz, u8 ps, bool va = false, u8 fo = 0)
133135
{
134136
u64 res = 0;
135-
switch(fd)
137+
switch (fd)
136138
{
137139
case 0b11:
138140
x = s8(x);
@@ -148,7 +150,7 @@ void kl1839vm1_device::kop(u8 kop, u8 fd, u32 x, u32 y, u8 rz, u8 ps, bool va =
148150
}
149151

150152
RSP &= ~(VF | CF);
151-
switch(kop)
153+
switch (kop)
152154
{
153155
case 0b0000: res = y; break;
154156
// 0b0001:
@@ -191,7 +193,7 @@ void kl1839vm1_device::kop(u8 kop, u8 fd, u32 x, u32 y, u8 rz, u8 ps, bool va =
191193
default: break;
192194
}
193195

194-
switch(fd)
196+
switch (fd)
195197
{
196198
case 0b11:
197199
res &= 0x000000ff;
@@ -207,7 +209,8 @@ void kl1839vm1_device::kop(u8 kop, u8 fd, u32 x, u32 y, u8 rz, u8 ps, bool va =
207209
break;
208210
}
209211
R(rz) |= res;
210-
if (rz == 0x1f) mreg_w();
212+
if (rz == 0x1f)
213+
mreg_w();
211214
}
212215

213216
bool kl1839vm1_device::mreg_r()
@@ -874,10 +877,14 @@ void kl1839vm1_device::vax_decode_pc()
874877
}
875878

876879
if (!m_op_size)
880+
{
877881
LOGVAX("(%x): undecoded OP=%02x .. EXIT\n", PC, op);
882+
}
878883
else
884+
{
879885
PC += m_op_size; // move to a next op
880-
;//LOGVAX("(%x): Decoded: OP=%02x args:%d \n", PC, op, m_pcm_queue.size());
886+
/*LOGVAX("(%x): Decoded: OP=%02x args:%d \n", PC, op, m_pcm_queue.size())*/;
887+
}
881888
}
882889

883890
u32 kl1839vm1_device::vax_pcm_pull(bool is_bo)

src/devices/cpu/vax/vaxdasm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,7 @@ bool vax_disassembler::is_read_mode(vax_disassembler::mode m)
11091109
}
11101110
}
11111111

1112-
const vax_disassembler::mode* vax_disassembler::get_operands(u8 op)
1112+
const vax_disassembler::mode *vax_disassembler::get_operands(u8 op)
11131113
{
11141114
return s_nonprefix_ops[op].operand;
11151115
}

src/devices/cpu/vax/vaxdasm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class vax_disassembler : public util::disasm_interface
3131
vax_disassembler();
3232

3333
static bool is_read_mode(mode m);
34-
static const mode* get_operands(u8 op);
34+
static const mode *get_operands(u8 op);
3535

3636
protected:
3737
// disassembler overrides

src/devices/machine/z80sio.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2551,9 +2551,11 @@ void z80sio_channel::txc_w(int state)
25512551
// Generate a new bit
25522552
bool new_bit = false;
25532553
if ((m_wr4 & (WR4_SYNC_MODE_MASK | WR4_STOP_BITS_MASK)) == (WR4_SYNC_MODE_SDLC | WR4_STOP_BITS_SYNC) &&
2554-
(m_tx_flags & (TX_FLAG_DATA_TX | TX_FLAG_CRC_TX)) && (m_tx_hist & 0x1f) == 0x1f)
2554+
(m_tx_flags & (TX_FLAG_DATA_TX | TX_FLAG_CRC_TX)) && (m_tx_hist & 0x1f) == 0x1f)
2555+
{
25552556
// SDLC, sending data/CRC & 5 ones in a row: do zero insertion
25562557
new_bit = false;
2558+
}
25572559
else
25582560
{
25592561
bool get_out = false;

src/frontend/mame/luaengine.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,13 +2106,15 @@ void lua_engine::initialize()
21062106
ui_type["options"] = sol::property([] (mame_ui_manager &m) { return static_cast<core_options *>(&m.options()); });
21072107
ui_type["line_height"] = sol::property([] (mame_ui_manager &m) { return m.get_line_height(); });
21082108
ui_type["menu_active"] = sol::property(&mame_ui_manager::is_menu_active);
2109-
ui_type["show_menu"] = &mame_ui_manager::show_menu;
21102109
ui_type["ui_active"] = sol::property(&mame_ui_manager::ui_active, &mame_ui_manager::set_ui_active);
21112110
ui_type["single_step"] = sol::property(&mame_ui_manager::single_step, &mame_ui_manager::set_single_step);
21122111
ui_type["show_fps"] = sol::property(&mame_ui_manager::show_fps, &mame_ui_manager::set_show_fps);
21132112
ui_type["show_profiler"] = sol::property(&mame_ui_manager::show_profiler, &mame_ui_manager::set_show_profiler);
21142113
ui_type["image_display_enabled"] = sol::property(&mame_ui_manager::image_display_enabled, &mame_ui_manager::set_image_display_enabled);
21152114

2115+
// undocumented/unsupported
2116+
ui_type["show_menu"] = &mame_ui_manager::show_menu; // FIXME: this is dangerous - it doesn't give a proper chance for the current UI handler to clean up
2117+
21162118

21172119
/* rom_entry library
21182120
*

0 commit comments

Comments
 (0)