summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2020-08-06 05:47:05 +1000
committer Vas Crabb <vas@vastheman.com>2020-08-06 05:47:05 +1000
commit309a2ee063ecf5e1cbd3df8a1e4c17ae691b2668 (patch)
tree60e0935e0fc9f7ea071a0756f1ef6a75430eba8b
parenta27476cec72abaec63252463b3805d732eb6d2e2 (diff)
-debug/debugcmd.cpp: Don't leak an open FILE when an argument is invalid and also fixed a spelling error.
* The saver/loadr commands should consider region endianness for portability. -cpu/gigatron: Capitalisation of hex values was inconsistent, change it to lowercase as that tends to be the MAME standard. -machine/exorterm.cpp: Fixed inputs magically changing on reset when they shouldn't (there are still others that should be fixed). -mpu4vid.cpp: Corrected some errors in game descriptions. -Fixed a couple of editing errors.
-rw-r--r--scripts/target/mame/nl.lua2
-rw-r--r--src/devices/bus/rs232/exorterm.cpp1
-rw-r--r--src/devices/cpu/gigatron/gigatron.cpp10
-rw-r--r--src/devices/machine/exorterm.cpp15
-rw-r--r--src/devices/machine/v3021.cpp2
-rw-r--r--src/devices/machine/v3021.h2
-rw-r--r--src/devices/sound/k053260.cpp1
-rw-r--r--src/emu/debug/debugcmd.cpp48
-rw-r--r--src/mame/drivers/exorciser.cpp3
-rw-r--r--src/mame/drivers/mpu4vid.cpp4
10 files changed, 41 insertions, 47 deletions
diff --git a/scripts/target/mame/nl.lua b/scripts/target/mame/nl.lua
index 926943a2e8f..6cd5fda0016 100644
--- a/scripts/target/mame/nl.lua
+++ b/scripts/target/mame/nl.lua
@@ -235,7 +235,7 @@ files{
MAME_DIR .. "src/mame/audio/nl_tailg.cpp",
MAME_DIR .. "src/mame/audio/nl_tailg.h",
MAME_DIR .. "src/mame/audio/nl_warrior.cpp",
- MAME_DIR .. "src/mame/audio/nl_Warrior.h",
+ MAME_DIR .. "src/mame/audio/nl_warrior.h",
MAME_DIR .. "src/mame/drivers/galaxian.cpp",
MAME_DIR .. "src/mame/includes/galaxian.h",
diff --git a/src/devices/bus/rs232/exorterm.cpp b/src/devices/bus/rs232/exorterm.cpp
index d47c15b4d54..a4980d53538 100644
--- a/src/devices/bus/rs232/exorterm.cpp
+++ b/src/devices/bus/rs232/exorterm.cpp
@@ -77,7 +77,6 @@ void exorterm155_terminal_device::device_reset()
m_exorterm155->rs232_conn_cts_w(0);
// To the computer
- output_rxd(1);
output_dcd(0);
output_dsr(0);
if (!m_flow_control->read())
diff --git a/src/devices/cpu/gigatron/gigatron.cpp b/src/devices/cpu/gigatron/gigatron.cpp
index 2090acecfe7..e2d3d8f6624 100644
--- a/src/devices/cpu/gigatron/gigatron.cpp
+++ b/src/devices/cpu/gigatron/gigatron.cpp
@@ -127,7 +127,7 @@ void gigatron_cpu_device::reset_cpu()
m_pc = 0;
m_npc = (m_pc + 1) & m_romMask;
m_ppc = 0;
- m_inReg = 0xFF;
+ m_inReg = 0xff;
m_outx = 0;
m_out = 0;
}
@@ -228,13 +228,13 @@ void gigatron_cpu_device::aluOp(uint8_t op, uint8_t mode, uint8_t bus, uint8_t d
case 7:
uint16_t rising = ~(m_out & b);
m_out = b;
- m_out_cb(0, m_out, 0xFF);
+ m_out_cb(0, m_out, 0xff);
// rising edge of out[6] registers outx from ac
if (rising & 0x40)
{
m_outx = m_ac;
- m_outx_cb(0, m_outx, 0xFF);
+ m_outx_cb(0, m_outx, 0xff);
}
break;
}
@@ -333,8 +333,8 @@ void gigatron_cpu_device::execute_set_input(int irqline, int state)
gigatron_cpu_device::gigatron_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: cpu_device(mconfig, GTRON, tag, owner, clock)
- , m_ramMask(0x7FFF)
- , m_romMask(0xFFFF)
+ , m_ramMask(0x7fff)
+ , m_romMask(0xffff)
, m_program_config("program", ENDIANNESS_BIG, 16, 14, -1)
, m_data_config("data", ENDIANNESS_BIG, 8, 15, 0)
, m_outx_cb(*this)
diff --git a/src/devices/machine/exorterm.cpp b/src/devices/machine/exorterm.cpp
index 923dc049ee7..0b62597e3f1 100644
--- a/src/devices/machine/exorterm.cpp
+++ b/src/devices/machine/exorterm.cpp
@@ -761,11 +761,8 @@ void exorterm155_device::device_start()
save_item(NAME(m_kbd_start_holdoff));
// Keyboard
-
- if (!m_kbd_scan_timer)
- m_kbd_scan_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(exorterm155_device::kbd_scan_row), this));
- if (!m_kbd_repeat_timer)
- m_kbd_repeat_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(exorterm155_device::kbd_repeat), this));
+ m_kbd_scan_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(exorterm155_device::kbd_scan_row), this));
+ m_kbd_repeat_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(exorterm155_device::kbd_repeat), this));
kbd_reset_state();
kbd_repeat_stop();
@@ -775,6 +772,9 @@ void exorterm155_device::device_start()
save_item(NAME(m_kbd_repeat_row));
save_item(NAME(m_kbd_repeat_column));
save_item(NAME(m_kbd_last_modifiers));
+
+ m_dsr = 1;
+ m_ring = 0;
}
void exorterm155_device::device_reset()
@@ -793,9 +793,6 @@ void exorterm155_device::device_reset()
m_special_char_disp = 0;
m_sys_timer_count = 0;
- m_dsr = 1;
- m_ring = 0;
-
m_beeper->set_state(0);
// Keyboard
@@ -819,7 +816,7 @@ ROM_START( exorterm155 )
ROM_LOAD("51aw1018b24.bin", 0xd800, 0x0800, CRC(18a0ed66) SHA1(5fa6e4b3c27969c1d7e27c79fc2993e4cc9262cf))
ROM_REGION(0x0800, "chargen", 0)
- ROM_LOAD("chargen.rom", 0x0000, 0x0800, CRC(0087cbad) SHA1(a6d3dd0512db4c459944c60d728536755a570964))
+ ROM_LOAD("chargen.rom", 0x0000, 0x0800, CRC(0087cbad) SHA1(a6d3dd0512db4c459944c60d728536755a570964) BAD_DUMP) // constructed from an apparently similar published Motorola character set
ROM_END
diff --git a/src/devices/machine/v3021.cpp b/src/devices/machine/v3021.cpp
index 50c0283f310..559a617340a 100644
--- a/src/devices/machine/v3021.cpp
+++ b/src/devices/machine/v3021.cpp
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Angelo Salese
+// copyright-holders:Angelo Salese,cam900
/***************************************************************************
v3021.cpp
diff --git a/src/devices/machine/v3021.h b/src/devices/machine/v3021.h
index 298dd4134f6..cac5c6884d4 100644
--- a/src/devices/machine/v3021.h
+++ b/src/devices/machine/v3021.h
@@ -1,5 +1,5 @@
// license:BSD-3-Clause
-// copyright-holders:Angelo Salese
+// copyright-holders:Angelo Salese,cam900
/***************************************************************************
v3021.h
diff --git a/src/devices/sound/k053260.cpp b/src/devices/sound/k053260.cpp
index 05b08c95131..181c992f360 100644
--- a/src/devices/sound/k053260.cpp
+++ b/src/devices/sound/k053260.cpp
@@ -65,7 +65,6 @@ static constexpr int CLOCKS_PER_SAMPLE = 64;
// device type definition
DEFINE_DEVICE_TYPE(K053260, k053260_device, "k053260", "K053260 KDSC")
- ;
// Pan multipliers. Set according to integer angles in degrees, amusingly.
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index 20263e435c7..309c73ecf22 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -1977,7 +1977,6 @@ void debugger_commands::execute_saveregion(int ref, const std::vector<std::strin
{
u64 offset, length;
memory_region *region;
- FILE *f;
/* validate parameters */
if (!validate_number_parameter(params[1], offset))
@@ -1987,21 +1986,21 @@ void debugger_commands::execute_saveregion(int ref, const std::vector<std::strin
if (!validate_memory_region_parameter(params[3], region))
return;
- /* open the file */
- f = fopen(params[0].c_str(), "wb");
- if (!f) {
- m_console.printf("Error opening file '%s'\n", params[0].c_str());
+ if (offset >= region->bytes())
+ {
+ m_console.printf("Invalid offset\n");
return;
}
+ if ((length <= 0) || ((length + offset) >= region->bytes()))
+ length = region->bytes() - offset;
- if(offset >= region->bytes()) {
- m_console.printf("Invalide offset\n");
+ /* open the file */
+ FILE *f = fopen(params[0].c_str(), "wb");
+ if (!f)
+ {
+ m_console.printf("Error opening file '%s'\n", params[0].c_str());
return;
}
- // get full length
- if(length <= 0 || length + offset >= region->bytes()) {
- length = region->bytes() - offset;
- }
fwrite(region->base() + offset, 1, length, f);
fclose(f);
@@ -2118,14 +2117,13 @@ void debugger_commands::execute_load(int ref, const std::vector<std::string> &pa
/*-------------------------------------------------
- execute_saveregion - execute the save command on region memory
+ execute_loadregion - execute the load command on region memory
-------------------------------------------------*/
void debugger_commands::execute_loadregion(int ref, const std::vector<std::string> &params)
{
u64 offset, length;
memory_region *region;
- FILE *f;
/* validate parameters */
if (!validate_number_parameter(params[1], offset))
@@ -2135,9 +2133,18 @@ void debugger_commands::execute_loadregion(int ref, const std::vector<std::strin
if (!validate_memory_region_parameter(params[3], region))
return;
+ if (offset >= region->bytes())
+ {
+ m_console.printf("Invalid offset\n");
+ return;
+ }
+ if ((length <= 0) || ((length + offset) >= region->bytes()))
+ length = region->bytes() - offset;
+
/* open the file */
- f = fopen(params[0].c_str(), "rb");
- if (!f) {
+ FILE *f = fopen(params[0].c_str(), "rb");
+ if (!f)
+ {
m_console.printf("Error opening file '%s'\n", params[0].c_str());
return;
}
@@ -2146,18 +2153,9 @@ void debugger_commands::execute_loadregion(int ref, const std::vector<std::strin
u64 size = ftell(f);
rewind(f);
- if(offset >= region->bytes()) {
- m_console.printf("Invalide offset\n");
- return;
- }
- // get full length
- if(length <= 0 || length + offset >= region->bytes()) {
- length = region->bytes() - offset;
- }
// check file size
- if(length >= size) {
+ if (length >= size)
length = size;
- }
fread(region->base() + offset, 1, length, f);
diff --git a/src/mame/drivers/exorciser.cpp b/src/mame/drivers/exorciser.cpp
index 2f15bfca0fd..f83ea59b38a 100644
--- a/src/mame/drivers/exorciser.cpp
+++ b/src/mame/drivers/exorciser.cpp
@@ -178,10 +178,11 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(maincpu_clock_change);
DECLARE_WRITE_LINE_MEMBER(abort_key_w);
-private:
+protected:
virtual void machine_reset() override;
virtual void machine_start() override;
+private:
void dbg_map(address_map &map);
void mem_map(address_map &map);
diff --git a/src/mame/drivers/mpu4vid.cpp b/src/mame/drivers/mpu4vid.cpp
index 318c703c5b1..10737f30668 100644
--- a/src/mame/drivers/mpu4vid.cpp
+++ b/src/mame/drivers/mpu4vid.cpp
@@ -8293,7 +8293,7 @@ GAME( 199?, v4sixxc, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwb
GAME( 199?, v4sixxg, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwbhack, ROT0, "BWB","6-X (BWB) (Release 3, 20p Switchable to 10p, Cash+Token) (MPU4 Video)",GAME_FLAGS )
GAME( 199?, v4sixxh, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwbhack, ROT0, "BWB","6-X (BWB) (Release 3, 20p Switchable to 10p, Cash+Token, Datapak) (set 1) (MPU4 Video)",GAME_FLAGS )
GAME( 199?, v4sixxi, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwbhack, ROT0, "BWB","6-X (BWB) (Release 3, 20p Switchable to 10p, Cash+Token, Datapak) (set 2) (MPU4 Video)",GAME_FLAGS )
-GAME( 199?, v4sixxj, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwbhack, ROT0, "BWB","6-X (BWB) (Release 3, 20p Switchable to 10p, Cash+Token, % Key) (MPU4 Video) (MPU4 Video)",GAME_FLAGS )
+GAME( 199?, v4sixxj, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwbhack, ROT0, "BWB","6-X (BWB) (Release 3, 20p Switchable to 10p, Cash+Token, % Key) (MPU4 Video)",GAME_FLAGS )
GAME( 199?, v4sixxk, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwbhack, ROT0, "BWB","6-X (BWB) (Release 3, 20p Fixed, All - Cash) (MPU4 Video)",GAME_FLAGS )
GAME( 199?, v4sixxl, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwbhack, ROT0, "BWB","6-X (BWB) (Release 3, 20p Switchable to 10p, All - Cash) (MPU4 Video)",GAME_FLAGS )
GAME( 199?, v4sixxm, v4sixx, bwbvid, bwbvid, mpu4vid_state, init_bwbhack, ROT0, "BWB","6-X (BWB) (Release 3, 20p Switchable to 10p, All - Cash, Datapak) (MPU4 Video)",GAME_FLAGS )
@@ -8378,7 +8378,7 @@ GAME( 1996, v4renob, v4reno, bwbvid5, bwbvid, mpu4vid_state, init_pri
GAME( 1996, v4renos, v4reno, bwbvid5, bwbvid, mpu4vid_state, init_prizeinv, ROT0, "BWB","Reno Reels (Release A, 20p Switchable 20p/10p/5p, Cash+Token) (set 1) (MPU4 Video)",GAME_FLAGS )
GAME( 1996, v4renou, v4reno, bwbvid5, bwbvid, mpu4vid_state, init_prizeinv, ROT0, "BWB","Reno Reels (Release A, 20p Switchable 20p/10p/5p, Cash+Token) (set 2) (MPU4 Video)",GAME_FLAGS )
GAME( 1996, v4renor, v4reno, bwbvid5, bwbvid, mpu4vid_state, init_prizeinv, ROT0, "BWB","Reno Reels (Release A, 20p Switchable 20p/10p/5p, Cash+Token) (Showcase) (set 1) (MPU4 Video)",GAME_FLAGS )
-GAME( 1996, v4renot, v4reno, bwbvid5, bwbvid, mpu4vid_state, init_prizeinv, ROT0, "BWB","Reno Reels (Release A, 20p Switchable 20p/10p/5p, Cash+Token) (Showcase) (set 2)(MPU4 Video)",GAME_FLAGS )
+GAME( 1996, v4renot, v4reno, bwbvid5, bwbvid, mpu4vid_state, init_prizeinv, ROT0, "BWB","Reno Reels (Release A, 20p Switchable 20p/10p/5p, Cash+Token) (Showcase) (set 2) (MPU4 Video)",GAME_FLAGS )
// older 68k version
GAME( 1996, v4reno8, v4reno, bwbvid5, bwbvid, mpu4vid_state, init_prizeinv, ROT0, "BWB","Reno Reels (Release 8, 20p Fixed, Cash+Token) (MPU4 Video)",GAME_FLAGS )
// 68k ROMs below have no matching base roms