summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-09-14 04:44:28 +1000
committer Vas Crabb <vas@vastheman.com>2022-09-14 04:46:58 +1000
commitf9728327f89e5cadaa36d3ddab9458580a00ac59 (patch)
tree454933e890f7a5113ad521eddc988d009ce5a012
parentef8929995307607be0dd3729ca4c4c5d0c8e1278 (diff)
More miscellaneous fixes:
* Fixed tiny build for consolidated driver files. * tools/unidasm.cpp: Capture big objects by reference in lambdas. * misc/oneshot.cpp: Fixed unsigned comparison to zero bugs.
-rw-r--r--scripts/target/mame/tiny.lua2
-rw-r--r--src/mame/misc/oneshot.cpp12
-rw-r--r--src/tools/unidasm.cpp16
3 files changed, 15 insertions, 15 deletions
diff --git a/scripts/target/mame/tiny.lua b/scripts/target/mame/tiny.lua
index c1ee27b7277..50586d03c63 100644
--- a/scripts/target/mame/tiny.lua
+++ b/scripts/target/mame/tiny.lua
@@ -163,8 +163,6 @@ files{
MAME_DIR .. "src/mame/gaelco/gaelco_v.cpp",
MAME_DIR .. "src/mame/gaelco/gaelcrpt.cpp",
MAME_DIR .. "src/mame/gaelco/wrally.cpp",
- MAME_DIR .. "src/mame/gaelco/wrally.h",
- MAME_DIR .. "src/mame/gaelco/wrally_v.cpp",
MAME_DIR .. "src/mame/gaelco/gaelco_wrally_sprites.cpp",
MAME_DIR .. "src/mame/gaelco/gaelco_wrally_sprites.h",
MAME_DIR .. "src/mame/gaelco/gaelco_ds5002fp.cpp",
diff --git a/src/mame/misc/oneshot.cpp b/src/mame/misc/oneshot.cpp
index 4e85fa476bf..7b6ae432db1 100644
--- a/src/mame/misc/oneshot.cpp
+++ b/src/mame/misc/oneshot.cpp
@@ -319,11 +319,11 @@ void oneshot_state::draw_crosshairs()
m_gun_x[0] += m_gun_x_shift;
- m_gun_y[0] -= 0x0a;
- if (m_gun_y[0] < 0)
+ if (m_gun_y[0] >= 0x0a)
+ m_gun_y[0] -= 0x0a;
+ else
m_gun_y[0] = 0;
-
// get gun raw coordinates (player 2)
m_gun_x[1] = (m_io_lightgun_x[1]->read() & 0xff) * 320 / 256;
m_gun_y[1] = (m_io_lightgun_y[1]->read() & 0xff) * 240 / 256;
@@ -332,8 +332,10 @@ void oneshot_state::draw_crosshairs()
//xpos = m_gun_x[1];
//ypos = m_gun_y[1];
- m_gun_x[1] += m_gun_x_shift - 0x0a;
- if (m_gun_x[1] < 0)
+ m_gun_x[1] += m_gun_x_shift;
+ if (m_gun_x[1] >= 0x0a)
+ m_gun_x[1] -= 0x0a;
+ else
m_gun_x[1] = 0;
}
diff --git a/src/tools/unidasm.cpp b/src/tools/unidasm.cpp
index cd5d04d6db6..3751db851a5 100644
--- a/src/tools/unidasm.cpp
+++ b/src/tools/unidasm.cpp
@@ -1477,7 +1477,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
if(is_octal) {
switch(granularity) {
case 1:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1491,7 +1491,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 2:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1505,7 +1505,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 4:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1519,7 +1519,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 8:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1535,7 +1535,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
} else {
switch(granularity) {
case 1:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1549,7 +1549,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 2:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1563,7 +1563,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 4:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)
@@ -1577,7 +1577,7 @@ int disasm_file(util::random_read &file, u64 length, options &opts)
break;
case 8:
- dump_raw_bytes = [step = disasm->opcode_alignment(), next_pc, base_buffer](offs_t pc, offs_t size) -> std::string {
+ dump_raw_bytes = [step = disasm->opcode_alignment(), &next_pc, &base_buffer](offs_t pc, offs_t size) -> std::string {
std::string result = "";
for(offs_t i=0; i != size; i++) {
if(i)