Skip to content

Commit

Permalink
Emulate Ultidos v1.0 (v2.6k)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusC64 authored and markusC64 committed Apr 29, 2018
1 parent 8fa1124 commit 6a45dd7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions software/filemanager/dos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ void Dos::parse_command(Message *command, Message **reply, Message **status) {
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:
Expand Down
2 changes: 2 additions & 0 deletions software/io/c64/c64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ void C64::set_emulation_flags(cart_def *def)
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;
Expand Down
6 changes: 6 additions & 0 deletions software/userinterface/config_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ extern "C" {
#include "config.h"
#include "config_menu.h"

extern int ultimatedosversion;

/************************/
/* ConfigBrowser Object */
/************************/
Expand Down Expand Up @@ -150,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;
Expand Down

0 comments on commit 6a45dd7

Please sign in to comment.