summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2016-06-19 17:44:18 +1000
committer Robbbert <Robbbert@users.noreply.github.com>2016-06-19 17:44:18 +1000
commit116a73910a52048a75f673bfdf1083e98c7243a2 (patch)
tree895d8595d83a859a051072cac398265458ac4d41 /src/devices/machine
parent7d18050b7bf4022e9c77114b1469aea7da79a538 (diff)
hp_taco: This compiles too. Unable to test because hp9845 is not working.
Diffstat (limited to 'src/devices/machine')
-rw-r--r--src/devices/machine/hp_taco.cpp13
-rw-r--r--src/devices/machine/hp_taco.h2
2 files changed, 6 insertions, 9 deletions
diff --git a/src/devices/machine/hp_taco.cpp b/src/devices/machine/hp_taco.cpp
index c0f62514653..e8d8e8651d5 100644
--- a/src/devices/machine/hp_taco.cpp
+++ b/src/devices/machine/hp_taco.cpp
@@ -1686,17 +1686,16 @@ void hp_taco_device::call_unload()
set_tape_present(false);
}
-int hp_taco_device::call_display_taco(std::string& s)
+std::string hp_taco_device::call_display()
{
+ std::string buffer;
// Mostly lifted from cassette_image_device::call_display ;)
// Do not show anything if image not loaded or tape not moving
if (!exists() || m_start_time.is_never()) {
- return -1;
+ return buffer;
}
- char buffer[ 64 ];
-
char track = BIT(m_status_reg , STATUS_TRACKB_BIT) ? 'B' : 'A';
char r_w = m_tape_wr ? 'W' : 'R';
char m1;
@@ -1712,12 +1711,10 @@ int hp_taco_device::call_display_taco(std::string& s)
int pos_in = current_tape_pos() / ONE_INCH_POS;
- snprintf(buffer , sizeof(buffer) , "%c %c %c%c [%04d/1824]" , track , r_w , m1 , m2 , pos_in);
-
- s = buffer;
+ buffer = string_format("%c %c %c%c [%04d/1824]" , track , r_w , m1 , m2 , pos_in);
// Not correct when there are 2 or more instances of TACO
- return 0;
+ return buffer;
}
const char *hp_taco_device::file_extensions() const
diff --git a/src/devices/machine/hp_taco.h b/src/devices/machine/hp_taco.h
index 0aeb41c9c36..e8a4f06cb65 100644
--- a/src/devices/machine/hp_taco.h
+++ b/src/devices/machine/hp_taco.h
@@ -47,7 +47,7 @@ public:
virtual bool call_load() override;
virtual bool call_create(int format_type, option_resolution *format_options) override;
virtual void call_unload() override;
- virtual int call_display_taco(std::string& s);
+ virtual std::string call_display() override;
virtual iodevice_t image_type() const override { return IO_MAGTAPE; }
virtual bool is_readable() const override { return true; }
virtual bool is_writeable() const override { return true; }