Added cassette support to the IBM PCjr.
This commit is contained in:
@@ -29,6 +29,8 @@
|
|||||||
#include <86box/86box.h>
|
#include <86box/86box.h>
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include <86box/timer.h>
|
#include <86box/timer.h>
|
||||||
|
#include <86box/device.h>
|
||||||
|
#include <86box/cassette.h>
|
||||||
#include <86box/io.h>
|
#include <86box/io.h>
|
||||||
#include <86box/nmi.h>
|
#include <86box/nmi.h>
|
||||||
#include <86box/pic.h>
|
#include <86box/pic.h>
|
||||||
@@ -614,6 +616,10 @@ kbd_write(uint16_t port, uint8_t val, void *priv)
|
|||||||
case 0x61:
|
case 0x61:
|
||||||
pcjr->pb = val;
|
pcjr->pb = val;
|
||||||
|
|
||||||
|
timer_process();
|
||||||
|
|
||||||
|
pc_cas_set_motor(cassette, (pcjr->pb & 0x08) == 0);
|
||||||
|
|
||||||
speaker_update();
|
speaker_update();
|
||||||
speaker_gated = val & 1;
|
speaker_gated = val & 1;
|
||||||
speaker_enable = val & 2;
|
speaker_enable = val & 2;
|
||||||
@@ -657,10 +663,14 @@ kbd_read(uint16_t port, void *priv)
|
|||||||
case 0x61:
|
case 0x61:
|
||||||
ret = pcjr->pb;
|
ret = pcjr->pb;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x62:
|
case 0x62:
|
||||||
ret = (pcjr->latched ? 1 : 0);
|
ret = (pcjr->latched ? 1 : 0);
|
||||||
ret |= 0x02; /*Modem card not installed*/
|
ret |= 0x02; /*Modem card not installed*/
|
||||||
|
if ((pcjr->pb & 0x08) || (cassette == NULL))
|
||||||
|
ret |= (ppispeakon ? 0x10 : 0);
|
||||||
|
else
|
||||||
|
ret |= (pc_cas_get_inp(cassette) ? 0x10 : 0);
|
||||||
ret |= (ppispeakon ? 0x10 : 0);
|
ret |= (ppispeakon ? 0x10 : 0);
|
||||||
ret |= (ppispeakon ? 0x20 : 0);
|
ret |= (ppispeakon ? 0x20 : 0);
|
||||||
ret |= (pcjr->data ? 0x40: 0);
|
ret |= (pcjr->data ? 0x40: 0);
|
||||||
|
Reference in New Issue
Block a user