mirror of
https://github.com/ksherlock/mpw.git
synced 2025-08-15 10:27:40 +00:00
HFS Dispatch (in design)
This commit is contained in:
@@ -10,6 +10,7 @@ set(TOOLBOX_SRC
|
|||||||
mm.cpp
|
mm.cpp
|
||||||
os.cpp
|
os.cpp
|
||||||
os_internal.cpp
|
os_internal.cpp
|
||||||
|
os_hfs_dispatch.cpp
|
||||||
os_highlevel.cpp
|
os_highlevel.cpp
|
||||||
qd.cpp
|
qd.cpp
|
||||||
sane.cpp
|
sane.cpp
|
||||||
|
@@ -150,6 +150,7 @@ namespace OS
|
|||||||
|
|
||||||
uint16_t TickCount(uint16_t trap);
|
uint16_t TickCount(uint16_t trap);
|
||||||
|
|
||||||
|
uint16_t HFSDispatch(uint16_t trap);
|
||||||
uint16_t HighLevelHFSDispatch(uint16_t trap);
|
uint16_t HighLevelHFSDispatch(uint16_t trap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
62
toolbox/os_hfs_dispatch.cpp
Normal file
62
toolbox/os_hfs_dispatch.cpp
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
#include <cerrno>
|
||||||
|
#include <cctype>
|
||||||
|
#include <ctime>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <chrono>
|
||||||
|
#include <deque>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <sys/xattr.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/paths.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
|
#include <cpu/defs.h>
|
||||||
|
#include <cpu/CpuModule.h>
|
||||||
|
#include <cpu/fmem.h>
|
||||||
|
|
||||||
|
#include "os.h"
|
||||||
|
#include "os_internal.h"
|
||||||
|
#include "toolbox.h"
|
||||||
|
#include "stackframe.h"
|
||||||
|
|
||||||
|
using ToolBox::Log;
|
||||||
|
using namespace ToolBox::Errors;
|
||||||
|
|
||||||
|
namespace OS {
|
||||||
|
|
||||||
|
uint16_t PBGetCatInfo(uint32_t paramBlock)
|
||||||
|
{
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint16_t HFSDispatch(uint16_t trap)
|
||||||
|
{
|
||||||
|
|
||||||
|
uint32_t selector = cpuGetDReg(0);
|
||||||
|
uint32_t paramBlock = cpuGetAReg(0);
|
||||||
|
|
||||||
|
Log("%04x HFSDispatch(%08x, %08x)\n", trap, selector, paramBlock);
|
||||||
|
|
||||||
|
switch (selector)
|
||||||
|
{
|
||||||
|
case 0x0009:
|
||||||
|
//return PBGetCatInfo(paramBlock);
|
||||||
|
//break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fprintf(stderr, "HFSDispatch: selector %08x not implemented\n",
|
||||||
|
selector);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -65,6 +65,9 @@ namespace ToolBox {
|
|||||||
d0 = OS::GetVol(trap);
|
d0 = OS::GetVol(trap);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0xa260:
|
||||||
|
d0 = OS::HFSDispatch(trap);
|
||||||
|
break;
|
||||||
|
|
||||||
case 0xaa52:
|
case 0xaa52:
|
||||||
d0 = OS::HighLevelHFSDispatch(trap);
|
d0 = OS::HighLevelHFSDispatch(trap);
|
||||||
@@ -256,6 +259,13 @@ namespace ToolBox {
|
|||||||
exit(255);
|
exit(255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (d0)
|
||||||
|
{
|
||||||
|
int16_t v = (int16_t)d0;
|
||||||
|
Log(" -> %d\n", v);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
cpuSetDReg(0, d0);
|
cpuSetDReg(0, d0);
|
||||||
cpuSetFlagsNZ00NewW(d0);
|
cpuSetFlagsNZ00NewW(d0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user