fix for WPS/LFN

This commit is contained in:
Wengier
2021-11-13 18:23:53 -05:00
parent e1388575d6
commit b60e0d1c56
2 changed files with 5 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ static void RestoreRegisters(void) {
reg_sp+=18;
}
extern bool force_sfn;
extern uint8_t ZDRIVE_NUM;
extern void GFX_SetTitle(int32_t cycles, int frameskip, Bits timing, bool paused), menu_update_autocycle(void);
void DOS_UpdatePSPName(void) {
@@ -356,11 +357,14 @@ bool DOS_Execute(const char* name, PhysPt block_pt, uint8_t flags) {
if (flags!=OVERLAY) {
/* Create an environment block */
envseg=block.exec.envseg;
force_sfn = true;
if (!MakeEnv(name,&envseg)) {
DOS_CloseFile(fhandle);
delete [] loadbuf;
force_sfn = false;
return false;
}
force_sfn = false;
uint16_t minsize;
/* Get Memory */
DOS_AllocateMemory(&pspseg,&maxfree);

View File

@@ -401,7 +401,7 @@ static bool DOS_MultiplexFunctions(void) {
char psp_name[9];
DOS_MCB psp_mcb(dos.psp()-1);
psp_mcb.GetFileName(psp_name);
if (!strcmp(psp_name, "INSTALL")) return false;
if (!strcmp(psp_name, "INSTALL") && reg_sp >= 0xD000 && mem_readw(SegPhys(ss)+reg_sp)/0x100 == 0x1E) return false;
}
reg_al = 1;
reg_ah = 1;