mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-10-14 02:17:36 +08:00
SVN r4492, r4493, r4494
This commit is contained in:
@@ -52,6 +52,9 @@ Next version
|
||||
r4487: Correct panning of VESA text modes.
|
||||
r4488: Correct comment about odd/even bit.
|
||||
r4490: Set MCB ownership when *blocks==total at end of DOS_ResizeMemory.
|
||||
r4492: Don't clear message queues of MPU-401 and compatibles on reset.
|
||||
r4493: Handle EOF character in batch files as actual end of file.
|
||||
r4494: Use 4-byte partial page mapping data.
|
||||
- Replaced deprecated functions to enable building with FFmpeg 8 (maron2000)
|
||||
- Fixed screen blanked when restoring minimized window in TTF mode (Windows
|
||||
SDL1) (maron2000)
|
||||
|
@@ -644,7 +644,6 @@ static void MPU401_Reset(void) {
|
||||
mpu.clock.clock_to_host=false;
|
||||
mpu.clock.cth_rate=60;
|
||||
mpu.clock.cth_counter=0;
|
||||
ClrQueue();
|
||||
mpu.state.req_mask=0;
|
||||
mpu.condbuf.counter=0;
|
||||
mpu.clock.cth_savecount=0;
|
||||
|
@@ -624,7 +624,7 @@ static uint8_t EMM_GetPagesForAllHandles(PhysPt table,uint16_t & handles) {
|
||||
}
|
||||
|
||||
static uint8_t EMM_PartialPageMapping(void) {
|
||||
PhysPt list,data;uint16_t count;
|
||||
PhysPt list,data;uint16_t count,page;
|
||||
switch (reg_al) {
|
||||
case 0x00: /* Save Partial Page Map */
|
||||
list = SegPhys(ds)+reg_si;
|
||||
@@ -634,37 +634,40 @@ static uint8_t EMM_PartialPageMapping(void) {
|
||||
for (;count>0;count--) {
|
||||
uint16_t segment=mem_readw(list);list+=2;
|
||||
if ((segment>=EMM_PAGEFRAME) && (segment<EMM_PAGEFRAME+0x1000u)) {
|
||||
uint16_t page = (unsigned int)(segment-EMM_PAGEFRAME) / (unsigned int)(EMM_PAGE_SIZE>>4u);
|
||||
mem_writew(data,segment);data+=2;
|
||||
MEM_BlockWrite(data,&emm_mappings[page],sizeof(EMM_Mapping));
|
||||
data+=sizeof(EMM_Mapping);
|
||||
page=(segment-EMM_PAGEFRAME)>>10;
|
||||
mem_writeb(data++,(uint8_t)page);
|
||||
mem_writeb(data++,(uint8_t)emm_mappings[page].handle);
|
||||
mem_writew(data,emm_mappings[page].page);
|
||||
} else if ((ems_type == EMS_MIXED) || (ems_type == EMS_EMM386) || ((segment>=EMM_PAGEFRAME-0x1000) && (segment<EMM_PAGEFRAME)) || ((segment>=0xa000) && (segment<0xb000))) {
|
||||
mem_writew(data,segment);data+=2;
|
||||
MEM_BlockWrite(data,&emm_segmentmappings[segment>>10u],sizeof(EMM_Mapping));
|
||||
data+=sizeof(EMM_Mapping);
|
||||
page=segment>>10;
|
||||
mem_writeb(data++,(uint8_t)page);
|
||||
mem_writeb(data++,(uint8_t)emm_segmentmappings[page].handle);
|
||||
mem_writew(data,emm_segmentmappings[page].page);
|
||||
} else {
|
||||
return EMM_ILL_PHYS;
|
||||
}
|
||||
data+=2;
|
||||
}
|
||||
break;
|
||||
case 0x01: /* Restore Partial Page Map */
|
||||
data = SegPhys(ds)+reg_si;
|
||||
count= mem_readw(data);data+=2;
|
||||
for (;count>0;count--) {
|
||||
uint16_t segment=mem_readw(data);data+=2;
|
||||
if ((segment>=EMM_PAGEFRAME) && (segment<EMM_PAGEFRAME+0x1000)) {
|
||||
uint16_t page = (unsigned int)(segment-EMM_PAGEFRAME) / (unsigned int)(EMM_PAGE_SIZE>>4);
|
||||
MEM_BlockRead(data,&emm_mappings[page],sizeof(EMM_Mapping));
|
||||
} else if ((ems_type == EMS_MIXED) || (ems_type == EMS_EMM386) || ((segment>=EMM_PAGEFRAME-0x1000) && (segment<EMM_PAGEFRAME)) || ((segment>=0xa000) && (segment<0xb000))) {
|
||||
MEM_BlockRead(data,&emm_segmentmappings[segment>>10u],sizeof(EMM_Mapping));
|
||||
page=(uint16_t)mem_readb(data++);
|
||||
if (page<EMM_MAX_PHYS) {
|
||||
emm_mappings[page].handle=(uint16_t)mem_readb(data++);
|
||||
emm_mappings[page].page=mem_readw(data);
|
||||
} else if (page<0x40) {
|
||||
emm_segmentmappings[page].handle=(uint16_t)mem_readb(data++);
|
||||
emm_segmentmappings[page].page=mem_readw(data);
|
||||
} else {
|
||||
return EMM_ILL_PHYS;
|
||||
}
|
||||
data+=sizeof(EMM_Mapping);
|
||||
data+=2;
|
||||
}
|
||||
return EMM_RestoreMappingTable();
|
||||
case 0x02: /* Get Partial Page Map Array Size */
|
||||
reg_al=(uint8_t)(2u+reg_bx*(2u+sizeof(EMM_Mapping)));
|
||||
reg_al=(uint8_t)(2+reg_bx*4);
|
||||
break;
|
||||
default:
|
||||
LOG(LOG_MISC,LOG_ERROR)("EMS:Call %2X Subfunction %2X not supported",reg_ah,reg_al);
|
||||
@@ -1091,7 +1094,7 @@ static Bitu INT67_Handler(void) {
|
||||
/* adjust paging entries for page frame (if mapped) */
|
||||
for (ct=0; ct<4; ct++) {
|
||||
uint16_t handle=emm_mappings[ct].handle;
|
||||
if (handle!=0xffff) {
|
||||
if (handle!=NULL_HANDLE) {
|
||||
uint16_t memh=(uint16_t)MEM_NextHandleAt(emm_handles[handle].mem,(unsigned int)emm_mappings[ct].page*4u);
|
||||
uint16_t entry_addr=(unsigned int)reg_di+(unsigned int)(EMM_PAGEFRAME>>6u)+(unsigned int)(ct*0x10u);
|
||||
real_writew(SegValue(es),entry_addr+0x00u+0x01u,(memh+0u)*0x10u); // mapping of 1/4 of page
|
||||
@@ -1152,7 +1155,7 @@ static Bitu INT67_Handler(void) {
|
||||
else if (mem_seg<EMM_PAGEFRAME+0xc00) phys_page=2;
|
||||
else phys_page=3;
|
||||
uint16_t handle=emm_mappings[phys_page].handle;
|
||||
if (handle==0xffff) {
|
||||
if (handle==NULL_HANDLE) {
|
||||
reg_ah=EMM_ILL_PHYS;
|
||||
break;
|
||||
} else {
|
||||
|
@@ -66,6 +66,13 @@ emptyline:
|
||||
n=1;
|
||||
DOS_ReadFile(file_handle,&c,&n);
|
||||
if (n>0) {
|
||||
if (c==0x1a) {
|
||||
// Stop at EOF character
|
||||
n=0;
|
||||
this->location=0;
|
||||
DOS_SeekFile(file_handle,&(this->location),DOS_SEEK_END);
|
||||
break;
|
||||
}
|
||||
/* Why are we filtering this ?
|
||||
* Exclusion list: tab for batch files
|
||||
* escape for ansi
|
||||
|
Reference in New Issue
Block a user