1
0
Fork 0

Move irq 2/9 to a different location.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2635
This commit is contained in:
Peter Veenstra 2006-05-23 10:30:02 +00:00
parent 1f016f7801
commit 796af47e74
2 changed files with 19 additions and 28 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: pic.cpp,v 1.34 2006-03-12 21:14:45 qbix79 Exp $ */
/* $Id: pic.cpp,v 1.35 2006-05-23 10:30:02 qbix79 Exp $ */
#include <list>
@ -452,20 +452,6 @@ bool PIC_RunQueue(void) {
return true;
}
//Irq 9-2 calling code
static Bitu INT71_Handler() {
IO_Write(0xa0,0x61);
CALLBACK_RunRealInt(0xa);
return CBRET_NONE;
}
static Bitu INT0A_Handler() {
IO_Write(0x20,0x62);
return CBRET_NONE;
}
/* The TIMER Part */
struct TickerBlock {
TIMER_TickHandler handler;
@ -522,7 +508,6 @@ class PIC:public Module_base{
private:
IO_ReadHandleObject ReadHandler[4];
IO_WriteHandleObject WriteHandler[4];
CALLBACK_HandlerObject callback[2];
public:
PIC(Section* configuration):Module_base(configuration){
/* Setup pic0 and pic1 with initial values like DOS has normally */
@ -575,12 +560,6 @@ public:
pic.entries[PIC_QUEUESIZE-1].next=0;
pic.free_entry=&pic.entries[0];
pic.next_entry=0;
/* Irq 9 and 2 thingie
* Should be done by bios but then it overwrites the mpu handler */
callback[0].Install(&INT71_Handler,CB_IRET,"irq 9 bios");
callback[0].Set_RealVec(0x71);
callback[1].Install(&INT0A_Handler,CB_IRET,"irq 2 bios");
callback[1].Set_RealVec(0xA);
}
~PIC(){
}

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: bios.cpp,v 1.59 2006-05-22 15:46:13 qbix79 Exp $ */
/* $Id: bios.cpp,v 1.60 2006-05-23 10:30:02 qbix79 Exp $ */
#include "dosbox.h"
#include "mem.h"
@ -61,6 +61,12 @@ static Bitu INT70_Handler(void) {
IO_Write(0x20,0x20);
return 0;
}
// Irq 9 calls irq 2
static Bitu INT71_Handler() {
IO_Write(0xa0,0x61);
CALLBACK_RunRealInt(0xa);
return CBRET_NONE;
}
CALLBACK_HandlerObject* tandy_DAC_callback;
static struct {
@ -813,7 +819,7 @@ void BIOS_SetupDisks(void);
class BIOS:public Module_base{
private:
CALLBACK_HandlerObject callback[9];
CALLBACK_HandlerObject callback[10];
public:
BIOS(Section* configuration):Module_base(configuration){
/* tandy DAC can be requested in tandy_sound.cpp by initializing this field */
@ -874,6 +880,16 @@ public:
callback[8].Install(&INT70_Handler,CB_IRET,"Int 70 RTC");
callback[8].Set_RealVec(0x70);
/* Irq 9 routed to irq 2 (which is an iret at f000:ff53) */
callback[9].Install(&INT71_Handler,CB_IRET,"irq 9 bios");
callback[9].Set_RealVec(0x71);
/* Some hardcoded vectors */
phys_writeb(0xfff53,0xcf); /* bios default interrupt vector location */
phys_writeb(0xfe987,0xea); /* original IRQ1 location (Defender booter) */
phys_writed(0xfe988,RealGetVec(0x09));
RealSetVec(0xA,0xf000ff53); /* Ghost busters 2 mt32 mode */
if (machine==MCH_TANDY) phys_writeb(0xffffe,0xff) ; /* Tandy model */
else if (machine==MCH_PCJR) phys_writeb(0xffffe,0xfd); /* PCJr model */
else phys_writeb(0xffffe,0xfc); /* PC */
@ -980,10 +996,6 @@ public:
IO_Write(0x70,0x31);
size_extended|=(IO_Read(0x71) << 8);
phys_writeb(0xfff53,0xcf); /* bios default interrupt vector location */
phys_writeb(0xfe987,0xea); /* original IRQ1 location (Defender booter) */
phys_writed(0xfe988,RealGetVec(0x09));
if (machine==MCH_PCJR) PIC_AddEvent(RAMRefresh_Event,RAM_REFRESH_DELAY);
}
~BIOS(){