Add read-only cassette emulation to IBM 5150 PC. Patch from JohnElliott.

This commit is contained in:
SarahW 2019-04-17 20:37:23 +01:00
commit 84a098bc98
18 changed files with 1891 additions and 1136 deletions

View file

@ -18,6 +18,8 @@
#include <stdlib.h>
#include <math.h>
#include "ibm.h"
#include "device.h"
#include "cassette.h"
#include "cdrom-ioctl.h"
#include "cdrom-image.h"
#include "config.h"
@ -899,6 +901,22 @@ int wx_handle_command(void* hwnd, int wParam, int checked)
{
zip_eject();
}
else if (ID_IS("IDM_CASSETTE_LOAD"))
{
if (!getfile(hwnd,
"Tape image (*.pzxi;*.pzx)|*.pzxi;*.pzx|All files (*.*)|*.*",
cassettefn))
{
cassette_eject();
cassette_load(openfilestring);
saveconfig(NULL);
}
}
else if (ID_IS("IDM_CASSETTE_EJECT"))
{
cassette_eject();
saveconfig(NULL);
}
else if (ID_IS("IDM_MACHINE_TOGGLE"))
{
if (emulation_state != EMULATION_STOPPED)