Added lot's of callback information. Added some useful information on how to use the debugger. Added patch 105158 from Hendrik Jan Visser
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2035
This commit is contained in:
parent
71ec900fe0
commit
232541c358
10 changed files with 241 additions and 115 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: bios.cpp,v 1.35 2004-08-04 09:12:56 qbix79 Exp $ */
|
||||
/* $Id: bios.cpp,v 1.36 2004-10-23 15:15:06 qbix79 Exp $ */
|
||||
|
||||
#include <time.h>
|
||||
#include "dosbox.h"
|
||||
|
@ -410,7 +410,7 @@ void BIOS_SetupKeyboard(void);
|
|||
void BIOS_SetupDisks(void);
|
||||
|
||||
void BIOS_Init(Section* sec) {
|
||||
MSG_Add("BIOS_CONFIGFILE_HELP","Nothing to setup yet!\n");
|
||||
MSG_Add("BIOS_CONFIGFILE_HELP","Nothing to setup yet!\n");
|
||||
/* Clear the Bios Data Area */
|
||||
for (Bit16u i=0;i<1024;i++) real_writeb(0x40,i,0);
|
||||
/* Setup all the interrupt handlers the bios controls */
|
||||
|
@ -418,7 +418,7 @@ void BIOS_Init(Section* sec) {
|
|||
//TODO Maybe give this a special callback that will also call int 8 instead of starting
|
||||
//a new system
|
||||
call_int8=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int8,&INT8_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int8,&INT8_Handler,CB_IRET,"Int 8 Clock");
|
||||
phys_writeb(CB_BASE+(call_int8<<4)+0,(Bit8u)0xFE); //GRP 4
|
||||
phys_writeb(CB_BASE+(call_int8<<4)+1,(Bit8u)0x38); //Extra Callback instruction
|
||||
phys_writew(CB_BASE+(call_int8<<4)+2,call_int8); //The immediate word
|
||||
|
@ -434,44 +434,44 @@ void BIOS_Init(Section* sec) {
|
|||
RealSetVec(0x8,CALLBACK_RealPointer(call_int8));
|
||||
/* INT 11 Get equipment list */
|
||||
call_int11=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int11,&INT11_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int11,&INT11_Handler,CB_IRET,"Int 11 Equipment");
|
||||
RealSetVec(0x11,CALLBACK_RealPointer(call_int11));
|
||||
/* INT 12 Memory Size default at 640 kb */
|
||||
call_int12=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int12,&INT12_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int12,&INT12_Handler,CB_IRET,"Int 12 Memory");
|
||||
RealSetVec(0x12,CALLBACK_RealPointer(call_int12));
|
||||
mem_writew(BIOS_MEMORY_SIZE,640);
|
||||
/* INT 13 Bios Disk Support */
|
||||
BIOS_SetupDisks();
|
||||
call_int14=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int14,&INT14_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int14,&INT14_Handler,CB_IRET,"Int 14 COM-port");
|
||||
RealSetVec(0x14,CALLBACK_RealPointer(call_int14));
|
||||
/* INT 15 Misc Calls */
|
||||
call_int15=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int15,&INT15_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int15,&INT15_Handler,CB_IRET,"Int 15 Bios");
|
||||
RealSetVec(0x15,CALLBACK_RealPointer(call_int15));
|
||||
/* INT 16 Keyboard handled in another file */
|
||||
BIOS_SetupKeyboard();
|
||||
/* INT 16 Printer Routines */
|
||||
call_int17=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int17,&INT17_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int17,&INT17_Handler,CB_IRET,"Int 17 Printer");
|
||||
RealSetVec(0x17,CALLBACK_RealPointer(call_int17));
|
||||
/* INT 1A TIME and some other functions */
|
||||
call_int1a=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int1a,&INT1A_Handler,CB_IRET_STI);
|
||||
CALLBACK_Setup(call_int1a,&INT1A_Handler,CB_IRET_STI,"Int 1a Time");
|
||||
RealSetVec(0x1A,CALLBACK_RealPointer(call_int1a));
|
||||
/* INT 1C System Timer tick called from INT 8 */
|
||||
call_int1c=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int1c,&INT1C_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int1c,&INT1C_Handler,CB_IRET,"Int 1c Timer tick");
|
||||
RealSetVec(0x1C,CALLBACK_RealPointer(call_int1c));
|
||||
/* IRQ 8 RTC Handler */
|
||||
call_int70=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int70,&INT70_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int70,&INT70_Handler,CB_IRET,"Int 70 RTC");
|
||||
RealSetVec(0x70,CALLBACK_RealPointer(call_int70));
|
||||
|
||||
/* Some defeault CPU error interrupt handlers */
|
||||
call_int1=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int1,&INT1_Single_Step,CB_IRET);
|
||||
CALLBACK_Setup(call_int1,&INT1_Single_Step,CB_IRET,"Int 1 Single step");
|
||||
RealSetVec(0x1,CALLBACK_RealPointer(call_int1));
|
||||
|
||||
/* Setup some stuff in 0x40 bios segment */
|
||||
|
|
|
@ -403,7 +403,7 @@ void BIOS_SetupDisks(void) {
|
|||
/* TODO Start the time correctly */
|
||||
call_int13=CALLBACK_Allocate();
|
||||
//CALLBACK_Setup(call_int13,&INT13_SmallHandler,CB_IRET);
|
||||
CALLBACK_Setup(call_int13,&INT13_DiskHandler,CB_IRET);
|
||||
CALLBACK_Setup(call_int13,&INT13_DiskHandler,CB_IRET,"Int 13 Bios disk");
|
||||
RealSetVec(0x13,CALLBACK_RealPointer(call_int13));
|
||||
int i;
|
||||
for(i=0;i<4;i++) {
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: ems.cpp,v 1.35 2004-10-17 14:45:00 qbix79 Exp $ */
|
||||
/* $Id: ems.cpp,v 1.36 2004-10-23 15:15:06 qbix79 Exp $ */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -610,14 +610,14 @@ static Bitu INT4B_Handler() {
|
|||
void EMS_Init(Section* sec) {
|
||||
/* Virtual DMA interrupt callback */
|
||||
call_vdma=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_vdma,&INT4B_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_vdma,&INT4B_Handler,CB_IRET,"Int 4b vdma");
|
||||
RealSetVec(0x4b,CALLBACK_RealPointer(call_vdma));
|
||||
|
||||
Section_prop * section=static_cast<Section_prop *>(sec);
|
||||
if (!section->Get_bool("ems")) return;
|
||||
BIOS_ZeroExtendedSize();
|
||||
call_int67=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_int67,&INT67_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_int67,&INT67_Handler,CB_IRET,"Int 67 ems");
|
||||
/* Register the ems device */
|
||||
DOS_Device * newdev = new device_EMM();
|
||||
DOS_AddDevice(newdev);
|
||||
|
|
|
@ -467,7 +467,7 @@ void INT10_Init(Section* sec) {
|
|||
if (machine==MCH_TANDY) SetupTandyBios();
|
||||
/* Setup the INT 10 vector */
|
||||
call_10=CALLBACK_Allocate();
|
||||
CALLBACK_Setup(call_10,&INT10_Handler,CB_IRET);
|
||||
CALLBACK_Setup(call_10,&INT10_Handler,CB_IRET,"Int 10 video");
|
||||
RealSetVec(0x10,CALLBACK_RealPointer(call_10));
|
||||
//Init the 0x40 segment and init the datastructures in the the video rom area
|
||||
INT10_SetupRomMemory();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue