_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;
}
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)
{
// TODO -- check new hfs bit ( (trap & 0x0200) == 0x0200)
// TODO -- check async bit ((trap & 0x0400) == 0x0400)
uint32_t selector = cpuGetDReg(0);
uint32_t paramBlock = cpuGetAReg(0);
@ -45,10 +55,14 @@ namespace OS {
switch (selector)
{
case 0x0009:
//case 0x0009:
//return PBGetCatInfo(paramBlock);
//break;
case 0x1a:
return PBOpenDF(paramBlock);
break;
default:
fprintf(stderr, "HFSDispatch: selector %08x not implemented\n",
selector);

View File

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