Open rhester72 opened 10 years ago
The crash on start can be worked around (using the same methodology as the Trinity hack) by the following:
set_byte (H_SCREEN_COLUMNS, 40); // 40 is slightly too large for the 38-character Zorkduino display, but anything other than a multiple of 40 crashes out
Changes required to make the Enter key function properly in Bureaucracy are listed in the comments below (derived from the original jzip source).
Unfortunately, it will now crash with a fatal error just after inputting your First Name.
Proper enter key/carriage return in Bureacracy:
zorkduino.ino, function select_game:
switch (c) {
case '\n':
fg.count = 0;
becomes
switch (c) {
case '\r':
fg.count = 0;
zorkduino.ino, function input_character:
return c;
}
becomes
return ( ( c == '\n' ) ? '\r' : c );
}
zdDisplay.cpp, function input_line:
else if (c == '\n')
{
scroll_line();
}
else if ((*read_size < buflen) && (col < screen_cols))
{
set_byte(addr + (*read_size)++, tolower(c));
display_char(c);
col++;
}
} while (c != '\n');
becomes
else if (c == '\r')
{
scroll_line();
}
else if ((*read_size < buflen) && (col < screen_cols))
{
set_byte(addr + (*read_size)++, tolower(c));
display_char(c);
col++;
}
} while (c != '\r');
Once you type anything other than "restore" and press Enter to start the game, it crashes back to the game selection menu.