From a16cd348e928b43d34b298c18a72fb885bc0b1c3 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 13 Feb 2013 22:16:40 -0500 Subject: [PATCH] update tools --- toolbox/CMakeLists.txt | 1 + toolbox/toolbox.cpp | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/toolbox/CMakeLists.txt b/toolbox/CMakeLists.txt index 5e0f246..f99b2d4 100644 --- a/toolbox/CMakeLists.txt +++ b/toolbox/CMakeLists.txt @@ -9,6 +9,7 @@ set(TOOLBOX_SRC rm.cpp mm.cpp os.cpp + mpw_time.cpp ) diff --git a/toolbox/toolbox.cpp b/toolbox/toolbox.cpp index 3da7df2..5c29bf9 100644 --- a/toolbox/toolbox.cpp +++ b/toolbox/toolbox.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -10,8 +11,8 @@ #include "rm.h" #include "mm.h" #include "os.h" +#include "mpw_time.h" -#include // yuck. TST.W d0 extern "C" void cpuSetFlagsNZ00NewW(UWO res); @@ -29,6 +30,10 @@ namespace ToolBox { uint32_t d0 = 0; switch (trap) { + case 0xa008: + d0 = OS::Create(trap); + break; + case 0xA00C: d0 = OS::GetFileInfo(trap); break; @@ -36,11 +41,25 @@ namespace ToolBox { d0 = OS::SetFileInfo(trap); break; + case 0xa014: + d0 = OS::GetVol(trap); + break; + // BlockMove (sourcePtr,destPtr: Ptr; byteCount: Size); case 0xa02e: d0 = MM::BlockMove(trap); 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; case 0xa11e: