From bd3a4cdb6ccdeb4a33fa84e2c321d422cd80ab07 Mon Sep 17 00:00:00 2001 From: markusC64 Date: Mon, 9 Jan 2017 20:54:58 +0100 Subject: [PATCH] Emulate Ultidos v1.0 (v2.6k) --- software/filemanager/dos.cc | 8 ++++++++ software/io/c64/c64.cc | 3 ++- software/userinterface/config_menu.cc | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/software/filemanager/dos.cc b/software/filemanager/dos.cc index ad0c537b..d1eac144 100644 --- a/software/filemanager/dos.cc +++ b/software/filemanager/dos.cc @@ -147,6 +147,14 @@ void Dos :: parse_command(Message *command, Message **reply, Message **status) if (cmd >= 0x18 && cmd <= 0x1f) command->message[1] = 0xff; if (cmd >= 0x26 && cmd <= 0x2f) command->message[1] = 0xff; } + if (ultimatedosversion == -3) + { + int cmd = command->message[1]; + if (cmd >= 0x09 && cmd <= 0x0f) command->message[1] = 0xff; + if (cmd >= 0x16 && cmd <= 0x1f) command->message[1] = 0xff; + if (cmd >= 0x23 && cmd <= 0x2f) command->message[1] = 0xff; + if (cmd == 0x15) command->message[1] = 0x17; + } switch(command->message[1]) { case DOS_CMD_IDENTIFY: diff --git a/software/io/c64/c64.cc b/software/io/c64/c64.cc index 5576d80d..b7921ca2 100644 --- a/software/io/c64/c64.cc +++ b/software/io/c64/c64.cc @@ -221,7 +221,8 @@ void C64 :: set_emulation_flags(cart_def *def) if(getFpgaCapabilities() & CAPAB_COMMAND_INTF) { int choice = cfg->get_value(CFG_CMD_ENABLE); CMD_IF_SLOT_ENABLE = !!choice; - ultimatedosversion = choice; + if (choice != 3 || ultimatedosversion != -3) + ultimatedosversion = choice; CMD_IF_SLOT_BASE = 0x47; // $DF1C choice = cfg->get_value(CFG_CMD_ALLOW_WRITE); allowUltimateDosDateSet = choice; diff --git a/software/userinterface/config_menu.cc b/software/userinterface/config_menu.cc index 7d351f50..068898c2 100644 --- a/software/userinterface/config_menu.cc +++ b/software/userinterface/config_menu.cc @@ -8,6 +8,10 @@ extern "C" { #include "config.h" #include "config_menu.h" + +extern int ultimatedosversion; + + /************************/ /* ConfigBrowser Object */ /************************/ @@ -148,6 +152,10 @@ int ConfigBrowser :: handle_key(int c) } ret = -2; break; + case KEY_CTRL_HOME: + if (ultimatedosversion == 3) + ultimatedosversion = -3; + break; case KEY_DOWN: // down state->down(1); break;