diff --git a/hash/tmc600_quik.xml b/hash/tmc600_quik.xml new file mode 100644 index 00000000000..6569f779afa --- /dev/null +++ b/hash/tmc600_quik.xml @@ -0,0 +1,47 @@ + + + + + + + Esittelyohjelma + 1982 + Telercas + + + + + + + + + + + Telmac SBASIC Menu + 1982 + Telercas + + + + + + + + + + + Väriesittelyohjelma + 1982 + Telercas + + + + + + + + + + diff --git a/src/mame/telercas/tmc600.cpp b/src/mame/telercas/tmc600.cpp index b33edd8a83f..f033533d88d 100644 --- a/src/mame/telercas/tmc600.cpp +++ b/src/mame/telercas/tmc600.cpp @@ -48,6 +48,16 @@ Notes: CDP1870 - RCA CDP1870CE Video Interface System (VIS) Color Video (DOT XTAL at 5.6260MHz, CHROM XTAL at 8.867238MHz) CN1 - RF connector [TMC-700] CN2 - 10x2 pin printer connector [TMC-700] + GND 1 2 D0 + GND 3 4 D1 + GND 5 6 D2 + GND 7 8 D3 + GND 9 10 D4 + GND 11 12 D5 + GND 13 14 D6 + GND 15 16 D7 + GND 17 18 BUSY + GND 19 20 _STROBE CN3 - 32x3 pin EURO connector CN4 - DIN5D tape connector 1 input (500 mV / 47 Kohm) @@ -256,6 +266,31 @@ void tmc600_state::out3_w(uint8_t data) m_out3 = data; } +QUICKLOAD_LOAD_MEMBER(tmc600_state::quickload_cb) +{ + int size = image.length(); + + if (size < 16) + return std::make_pair(image_error::INVALIDLENGTH, "Image is too short"); + + if ((size - 16) > (m_ram->size() - 0x300)) + return std::make_pair(image_error::INVALIDLENGTH, "Image is larger than RAM"); + + address_space &program = m_maincpu->space(AS_PROGRAM); + + image.fseek(0x5, SEEK_SET); + image.fread(program.get_write_ptr(0x6181), 4); // DEFUS and EOP + image.fread(program.get_write_ptr(0x6192), 4); // STRING and ARRAY + + image.fseek(0x9, SEEK_SET); + image.fread(program.get_write_ptr(0x6199), 2); // EOD + + image.fseek(0xf, SEEK_SET); + image.fread(program.get_write_ptr(0x6300), size); // program + + return std::make_pair(std::error_condition(), std::string()); +} + /* Machine Drivers */ void tmc600_state::tmc600(machine_config &config) @@ -280,11 +315,9 @@ void tmc600_state::tmc600(machine_config &config) m_bwio->mode_cb().set_constant(1); m_bwio->do_cb().set(FUNC(tmc600_state::out3_w)); -#if 0 // address bus demux for expansion bus cdp1852_device &demux(CDP1852(config, CDP1852_BUS_TAG)); // clock is expansion bus TPA demux.mode_cb().set_constant(0); -#endif // printer output latch cdp1852_device &prtout(CDP1852(config, CDP1852_TMC700_TAG)); // clock is CDP1802 TPB @@ -299,11 +332,19 @@ void tmc600_state::tmc600(machine_config &config) CASSETTE(config, m_cassette); m_cassette->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); + // quickload + quickload_image_device &quickload(QUICKLOAD(config, "quickload", "tmc600")); + quickload.set_load_callback(FUNC(tmc600_state::quickload_cb)); + quickload.set_interface("tmc600_quik"); + // expansion bus connector TMC600_EUROBUS_SLOT(config, m_bus, tmc600_eurobus_cards, nullptr); // internal RAM RAM(config, RAM_TAG).set_default_size("8K"); + + // software lists + SOFTWARE_LIST(config, "quik_list").set_original("tmc600_quik"); } /* ROMs */ diff --git a/src/mame/telercas/tmc600.h b/src/mame/telercas/tmc600.h index 5b33991a12c..24e5c38d341 100644 --- a/src/mame/telercas/tmc600.h +++ b/src/mame/telercas/tmc600.h @@ -14,6 +14,7 @@ #include "machine/ram.h" #include "machine/timer.h" #include "sound/cdp1869.h" +#include "softlist_dev.h" #include "speaker.h" #define SCREEN_TAG "screen" @@ -95,6 +96,8 @@ private: void cdp1869_page_ram(address_map &map); void tmc600_io_map(address_map &map); void tmc600_map(address_map &map); + + DECLARE_QUICKLOAD_LOAD_MEMBER(quickload_cb); }; #endif // MAME_TELERCAS_TMC600_H