_FSDispatch OpenDF (for Apple's Mac C compiler)

This commit is contained in:
Kelvin Sherlock 2013-03-27 23:54:08 -04:00
parent 828dc94c90
commit 84598e0ac7
2 changed files with 19 additions and 4 deletions

View File

@ -35,9 +35,19 @@ namespace OS {
return 0; return 0;
} }
uint16_t PBOpenDF(uint32_t paramBlock)
{
Log(" PBOpenDF\n");
// same as Open but slightly different handling of . files.
return OS::Open(0xa000);
}
uint16_t HFSDispatch(uint16_t trap) uint16_t HFSDispatch(uint16_t trap)
{ {
// TODO -- check new hfs bit ( (trap & 0x0200) == 0x0200)
// TODO -- check async bit ((trap & 0x0400) == 0x0400)
uint32_t selector = cpuGetDReg(0); uint32_t selector = cpuGetDReg(0);
uint32_t paramBlock = cpuGetAReg(0); uint32_t paramBlock = cpuGetAReg(0);
@ -45,10 +55,14 @@ namespace OS {
switch (selector) switch (selector)
{ {
case 0x0009: //case 0x0009:
//return PBGetCatInfo(paramBlock); //return PBGetCatInfo(paramBlock);
//break; //break;
case 0x1a:
return PBOpenDF(paramBlock);
break;
default: default:
fprintf(stderr, "HFSDispatch: selector %08x not implemented\n", fprintf(stderr, "HFSDispatch: selector %08x not implemented\n",
selector); selector);

View File

@ -80,9 +80,10 @@ namespace ToolBox {
d0 = OS::SetFPos(trap); d0 = OS::SetFPos(trap);
break; break;
//case 0xa260: case 0xa060:
// d0 = OS::HFSDispatch(trap); // also a260 for async
// break; d0 = OS::HFSDispatch(trap);
break;
case 0xaa52: case 0xaa52:
d0 = OS::HighLevelHFSDispatch(trap); d0 = OS::HighLevelHFSDispatch(trap);