update tools

This commit is contained in:
Kelvin Sherlock 2013-02-13 22:16:40 -05:00
parent 44dbdd89a4
commit a16cd348e9
2 changed files with 21 additions and 1 deletions

View File

@ -9,6 +9,7 @@ set(TOOLBOX_SRC
rm.cpp rm.cpp
mm.cpp mm.cpp
os.cpp os.cpp
mpw_time.cpp
) )

View File

@ -1,6 +1,7 @@
#include <cstdio> #include <cstdio>
#include <cstdint> #include <cstdint>
#include <stdlib.h> #include <stdlib.h>
#include <string>
#include <cpu/defs.h> #include <cpu/defs.h>
#include <cpu/CpuModule.h> #include <cpu/CpuModule.h>
@ -10,8 +11,8 @@
#include "rm.h" #include "rm.h"
#include "mm.h" #include "mm.h"
#include "os.h" #include "os.h"
#include "mpw_time.h"
#include <string>
// yuck. TST.W d0 // yuck. TST.W d0
extern "C" void cpuSetFlagsNZ00NewW(UWO res); extern "C" void cpuSetFlagsNZ00NewW(UWO res);
@ -29,6 +30,10 @@ namespace ToolBox {
uint32_t d0 = 0; uint32_t d0 = 0;
switch (trap) switch (trap)
{ {
case 0xa008:
d0 = OS::Create(trap);
break;
case 0xA00C: case 0xA00C:
d0 = OS::GetFileInfo(trap); d0 = OS::GetFileInfo(trap);
break; break;
@ -36,12 +41,26 @@ namespace ToolBox {
d0 = OS::SetFileInfo(trap); d0 = OS::SetFileInfo(trap);
break; break;
case 0xa014:
d0 = OS::GetVol(trap);
break;
// BlockMove (sourcePtr,destPtr: Ptr; byteCount: Size); // BlockMove (sourcePtr,destPtr: Ptr; byteCount: Size);
case 0xa02e: case 0xa02e:
d0 = MM::BlockMove(trap); d0 = MM::BlockMove(trap);
break; break;
// ReadDateTime (VAR sees: LONGINT) : OSErr;
case 0xa039:
d0 = Time::ReadDateTime(trap);
break;
// SecondsToDate (s: LongInt; VAR d: DateTimeRec);
case 0xa9c6:
d0 = Time::SecondsToDate(trap);
break;
// NewPtr [Sys, Clear] (logicalSize: Size): Ptr; // NewPtr [Sys, Clear] (logicalSize: Size): Ptr;
case 0xa11e: case 0xa11e:
case 0xa31e: case 0xa31e: