diff --git a/defs/ADB.yaml b/defs/ADB.yaml new file mode 100644 index 0000000..5e557f0 --- /dev/null +++ b/defs/ADB.yaml @@ -0,0 +1,120 @@ +- struct: + name: ADBDataBlock + members: + - name: devType + type: SignedByte + - name: origADBAddr + type: SignedByte + - name: dbServiceRtPtr + type: ProcPtr + - name: dbDataAreaAddr + type: Ptr + size: 10 + +# #### + +- struct: + name: ADBSetInfoBlock + members: + - name: siServiceRtPtr + type: ProcPtr + - name: siDataAreaAddr + type: Ptr + size: 8 + +# #### + +- lowmem: + name: KbdLast + type: Byte + address: 0x218 + comment: | + QuickDraw IMV-367 (false); + +# #### + +- lowmem: + name: KbdType + type: Byte + address: 0x21E + comment: | + QuickDraw IMV-367 (false); + +# #### + +- function: + name: ADBReInit + executor: true + trap: 0xA07B + +# #### + +- function: + name: ADBOp + return: OSErr + args: + - name: data + type: Ptr + - name: procp + type: ProcPtr + - name: buffer + type: Ptr + - name: command + type: INTEGER + +# #### + +- function: + name: CountADBs + return: INTEGER + executor: true + trap: 0xA077 + returnreg: D0 + +# #### + +- function: + name: GetIndADB + return: OSErr + args: + - name: adbp + type: ADBDataBlock* + register: A0 + - name: index + type: INTEGER + register: D0 + executor: true + trap: 0xA078 + returnreg: D0 + +# #### + +- function: + name: GetADBInfo + return: OSErr + args: + - name: adbp + type: ADBDataBlock* + register: A0 + - name: address + type: INTEGER + register: D0 + executor: true + trap: 0xA079 + returnreg: D0 + +# #### + +- function: + name: SetADBInfo + return: OSErr + args: + - name: adbp + type: ADBSetInfoBlock* + register: A0 + - name: address + type: INTEGER + register: D0 + executor: true + trap: 0xA07A + returnreg: D0 diff --git a/defs/AliasMgr.yaml b/defs/AliasMgr.yaml new file mode 100644 index 0000000..6428563 --- /dev/null +++ b/defs/AliasMgr.yaml @@ -0,0 +1,217 @@ +- typedef: + name: AliasFilterUPP + type: ProcPtr + +# #### + +- typedef: + name: AliasHandle + type: Handle + +# #### + +- typedef: + name: AliasTypeInfo + type: int16_t + +# #### + +- enum: + values: + - name: kSystemFolderType + value: "'macs'" + - name: kDesktopFolderType + value: "'desk'" + - name: kTrashFolderType + value: "'trsh'" + - name: kWhereToEmptyTrashFolderType + value: "'empt'" + - name: kPrintMonitorDocsFolderType + value: "'prnt'" + - name: kStartupFolderType + value: "'strt'" + - name: kAppleMenuFolderType + value: "'amnu'" + - name: kControlPanelFolderType + value: "'ctrl'" + - name: kExtensionFolderType + value: "'extn'" + - name: kPreferencesFolderType + value: "'pref'" + - name: kTemporaryFolderType + value: "'temp'" + - name: kFontFolderType + value: "'font'" + +# #### + +- dispatcher: + name: AliasDispatch + trap: 0xA823 + selector-location: D0W + +# #### + +- function: + name: FindFolder + return: OSErr + args: + - name: vRefNum + type: int16_t + - name: folderType + type: OSType + - name: createFolder + type: Boolean + - name: foundVRefNum + type: int16_t* + - name: foundDirID + type: int32_t* + dispatcher: AliasDispatch + selector: 0x0000 + executor: C_ + +# #### + +- function: + name: NewAlias + return: OSErr + args: + - name: fromFile + type: FSSpecPtr + - name: target + type: FSSpecPtr + - name: alias + type: AliasHandle* + dispatcher: AliasDispatch + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: NewAliasMinimal + return: OSErr + args: + - name: target + type: FSSpecPtr + - name: alias + type: AliasHandle* + dispatcher: AliasDispatch + selector: 0x0008 + executor: C_ + +# #### + +- function: + name: NewAliasMinimalFromFullPath + return: OSErr + args: + - name: fullpathLength + type: int16_t + - name: fullpath + type: Ptr + - name: zoneName + type: Str32 + - name: serverName + type: Str31 + - name: alias + type: AliasHandle* + dispatcher: AliasDispatch + selector: 0x0009 + executor: C_ + +# #### + +- function: + name: UpdateAlias + return: OSErr + args: + - name: fromFile + type: FSSpecPtr + - name: target + type: FSSpecPtr + - name: alias + type: AliasHandle + - name: wasChanged + type: Boolean* + dispatcher: AliasDispatch + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: ResolveAlias + return: OSErr + args: + - name: fromFile + type: FSSpecPtr + - name: alias + type: AliasHandle + - name: target + type: FSSpecPtr + - name: wasAliased + type: Boolean* + dispatcher: AliasDispatch + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: ResolveAliasFile + return: OSErr + args: + - name: theSpec + type: FSSpecPtr + - name: resolveAliasChains + type: Boolean + - name: targetIsFolder + type: Boolean* + - name: wasAliased + type: Boolean* + dispatcher: AliasDispatch + selector: 0x000C + executor: C_ + +# #### + +- function: + name: MatchAlias + return: OSErr + args: + - name: fromFile + type: FSSpecPtr + - name: rulesMask + type: int32_t + - name: alias + type: AliasHandle + - name: aliasCount + type: int16_t* + - name: aliasList + type: FSSpecArrayPtr + - name: needsUpdate + type: Boolean* + - name: aliasFilter + type: AliasFilterUPP + - name: yourDataPtr + type: Ptr + dispatcher: AliasDispatch + selector: 0x0005 + executor: C_ + +# #### + +- function: + name: GetAliasInfo + return: OSErr + args: + - name: alias + type: AliasHandle + - name: index + type: AliasTypeInfo + - name: theString + type: Str63 + dispatcher: AliasDispatch + selector: 0x0007 + executor: C_ diff --git a/defs/AppleEvents.yaml b/defs/AppleEvents.yaml new file mode 100644 index 0000000..6f16ec1 --- /dev/null +++ b/defs/AppleEvents.yaml @@ -0,0 +1,1659 @@ +- typedef: + name: AEEventClass + type: int32_t + +# #### + +- typedef: + name: AEEventID + type: int32_t + +# #### + +- typedef: + name: AEKeyword + type: int32_t + +# #### + +- typedef: + name: DescType + type: ResType + +# #### + +- struct: + name: AEDesc + members: + - name: descriptorType + type: DescType + - name: dataHandle + type: Handle + size: 8 + +# #### + +- typedef: + name: descriptor_t + type: AEDesc + comment: | + ### hack, delete + +# #### + +- executor_only: + code: | + #define DESC_TYPE(desc) ((desc)->descriptorType) + #define DESC_DATA(desc) ((desc)->dataHandle) + +# #### + +- struct: + name: AEKeyDesc + members: + - name: descKey + type: AEKeyword + - name: descContent + type: AEDesc + size: 12 + +# #### + +- typedef: + name: key_desc_t + type: AEKeyDesc + +# #### + +- executor_only: + code: | + #define KEY_DESC_KEYWORD(keydesc) ((keydesc)->descKey) + #define KEY_DESC_CONTENT(keydesc) ((keydesc)->descContent) + +# #### + +- typedef: + name: AEAddressDesc + type: AEDesc + +# #### + +- typedef: + name: AEDescList + type: AEDesc + +# #### + +- typedef: + name: AERecord + type: AEDescList + +# #### + +- typedef: + name: AppleEvent + type: AERecord + +# #### + +- typedef: + name: AESendMode + type: int32_t + +# #### + +- enum: + values: + - name: _kAEReplyMask + value: 0x3 + +# #### + +- enum: + values: + - name: kAENoReply + value: 0x1 + - name: kAEQueueReply + value: 0x2 + - name: kAEWaitReply + value: 0x3 + +# #### + +- enum: + values: + - name: _kAEInteractMask + value: 0x30 + +# #### + +- enum: + values: + - name: kAENeverInteract + value: 0x10 + - name: kAECanInteract + value: 0x20 + - name: kAEAlwaysInteract + value: 0x30 + +# #### + +- enum: + values: + - name: kAECanSwitchLayer + value: 0x40 + - name: kAEDontReconnect + value: 0x80 + +# #### + +- typedef: + name: AESendPriority + type: int16_t + comment: | + #define kAEWantReceipt ??? + +# #### + +- typedef: + name: AEEventSource + type: uint8_t + +# #### + +- typedef: + name: AEInteractionAllowed + type: uint8_t + +# #### + +- typedef: + name: AEArrayType + type: uint8_t + +# #### + +- enum: + values: + - name: kAEInteractWithSelf + value: 0 + - name: kAEInteractWithLocal + value: 1 + - name: kAEInteractWithAll + value: 2 + +# #### + +- enum: + values: + - name: kAEUnknownSource + value: 0 + - name: kAEDirectCall + value: 1 + - name: kAESameProcess + value: 2 + - name: kAELocalProcess + value: 3 + - name: kAERemoteProcess + value: 4 + +# #### + +- enum: + values: + - name: kAEDataArray + - name: kAEPackedArray + - name: kAEHandleArray + - name: kAEDescArray + - name: kAEKeyDescArray + +# #### + +- enum: + values: + - name: kAutoGenerateReturnID + value: -1 + - name: kAnyTransactionID + value: 0 + +# #### + +- enum: + values: + - name: kAENormalPriority + value: 0 + - name: kAEHighPriority + value: 1 + +# #### + +- enum: + values: + - name: kAEDefaultTimeout + value: -1 + - name: kNoTimeOut + value: -2 + +# #### + +- union: + name: AEArrayData + members: + - name: AEDataArray + type: int16_t[1] + - name: AEPackedArray + type: int8_t[1] + - name: AEHandleArray + type: Handle[1] + - name: AEDescArray + type: AEDesc[1] + - name: AEKeyDescArray + type: AEKeyDesc[1] + size: 12 + +# #### + +- typedef: + name: AEArrayDataPointer + type: AEArrayData* + +# #### + +- typedef: + name: IdleUPP + type: ProcPtr + +# #### + +- typedef: + name: EventFilterUPP + type: ProcPtr + +# #### + +- funptr: + return: OSErr + args: + - name: evt + type: const AppleEvent* + - name: reply + type: AppleEvent* + - name: refcon + type: int32_t + name: AEEventHandlerUPP + +# #### + +- funptr: + return: OSErr + args: + - name: data_type + type: DescType + - name: data + type: Ptr + - name: data_size + type: Size + - name: to_type + type: DescType + - name: refcon + type: int32_t + - name: desc_out + type: AEDesc* + name: AECoercePtrUPP + +# #### + +- funptr: + return: OSErr + args: + - name: desc + type: AEDesc* + - name: to_type + type: DescType + - name: refcon + type: int32_t + - name: desc_out + type: AEDesc* + name: AECoerceDescUPP + +# #### + +- struct: + name: AE_hdlr + members: + - name: fn + type: void* + - name: refcon + type: int32_t + +# #### + +- typedef: + name: AE_hdlr_t + type: AE_hdlr + comment: | + #### internal + size: 8 + +# #### + +- struct: + name: AE_hdlr_selector + members: + - name: sel0 + type: int32_t + - name: sel1 + type: int32_t + +# #### + +- typedef: + name: AE_hdlr_selector_t + type: AE_hdlr_selector + size: 8 + +# #### + +- struct: + name: AE_hdlr_table_elt + members: + - name: pad_1 + type: int32_t + - name: selector + type: AE_hdlr_selector_t + - name: hdlr + type: AE_hdlr_t + - name: pad_2 + type: int32_t + +# #### + +- typedef: + name: AE_hdlr_table_elt_t + type: AE_hdlr_table_elt + size: 24 + +# #### + +- executor_only: + code: | + #define AE_TABLE_ELTS(table) ((*table)->elts) + #define AE_TABLE_N_ELTS(table) ((*table)->n_elts) + #define AE_TABLE_N_ALLOCATED_BYTES(table) \ + ((*table)->n_allocated_bytes) + +# #### + +- struct: + name: AE_hdlr_table + members: + - name: pad_1 + type: int32_t + - name: n_allocated_bytes + type: int32_t + - name: n_elts + type: int32_t + - name: pad_2 + type: int32_t[10] + - name: elts + type: AE_hdlr_table_elt_t[0] + +# #### + +- typedef: + name: AE_hdlr_table_t + type: AE_hdlr_table + size: 52 + +# #### + +- typedef: + name: AE_hdlr_table_ptr + type: AE_hdlr_table_t* + +# #### + +- typedef: + name: AE_hdlr_table_h + type: AE_hdlr_table_ptr* + +# #### + +- struct: + name: AE_zone_tables + members: + - name: event_hdlr_table + type: AE_hdlr_table_h + - name: coercion_hdlr_table + type: AE_hdlr_table_h + - name: special_hdlr_table + type: AE_hdlr_table_h + - name: pad_1 + type: char[28] + - name: unknown_appl_value + type: char[4] + - name: pad_2 + type: char[8] + - name: unknown_sys_handle + type: Handle + +# #### + +- typedef: + name: AE_zone_tables_t + type: AE_zone_tables + comment: | + points to a 32byte handle of unknown contents (at least, + sometimes) + size: 56 + +# #### + +- typedef: + name: AE_zone_tables_ptr + type: AE_zone_tables_t* + +# #### + +- typedef: + name: AE_zone_tables_h + type: AE_zone_tables_ptr* + +# #### + +- struct: + members: + - name: pad_1 + type: char[340] + - name: appl_zone_tables + type: AE_zone_tables_h + - name: pad_2 + type: char[36] + - name: system_zone_tables + type: AE_zone_tables_h + - name: pad_3 + type: char[212] + name: AE_info_t + size: 596 + +# #### + +- typedef: + name: AE_info_ptr + type: AE_info_t* + +# #### + +- dispatcher: + name: Pack8 + trap: 0xA816 + selector-location: D0W + +# #### + +- function: + name: _AE_hdlr_table_alloc + return: OSErr + args: + - type: int32_t + - type: int32_t + - type: int32_t + - type: int8_t + - type: AE_hdlr_table_h* + comment: | + "internal". TODO: verify if they really exist as entry points. + dispatcher: Pack8 + selector: 0x092E + executor: C_ + +# #### + +- function: + name: _AE_hdlr_delete + return: OSErr + args: + - type: AE_hdlr_table_h + - type: int32_t + - type: AE_hdlr_selector_t* + dispatcher: Pack8 + selector: 0x0632 + executor: C_ + +# #### + +- function: + name: _AE_hdlr_lookup + return: OSErr + args: + - type: AE_hdlr_table_h + - type: int32_t + - type: AE_hdlr_selector_t* + - type: AE_hdlr_t* + dispatcher: Pack8 + selector: 0x0833 + executor: C_ + +# #### + +- function: + name: _AE_hdlr_install + return: OSErr + args: + - type: AE_hdlr_table_h + - type: int32_t + - type: AE_hdlr_selector_t* + - type: AE_hdlr_t* + dispatcher: Pack8 + selector: 0x0831 + executor: C_ + +# #### + +- executor_only: + code: | + /* private */ + + extern bool send_application_open_aevt_p; + extern bool application_accepts_open_app_aevt_p; + + /* error codes */ + + #define AE_RETURN_ERROR(error) \ + do { \ + OSErr _error_ = (error); \ + \ + if(_error_ != noErr) \ + warning_unexpected("error `%d'", _error_); \ + return _error_; \ + } while(0) + +# #### + +- enum: + values: + - name: invalidConnection + value: -609 + +# #### + +- enum: + values: + - name: errAECoercionFail + value: -1700 + - name: errAEDescNotFound + value: -1701 + - name: errAEWrongDataType + value: -1703 + - name: errAENotAEDesc + value: -1704 + +# #### + +- enum: + values: + - name: errAEEventNotHandled + value: -1708 + - name: errAEUnknownAddressType + value: -1716 + +# #### + +- enum: + values: + - name: errAEHandlerNotFound + value: -1717 + - name: errAEIllegalIndex + value: -1719 + +# #### + +- enum: + values: + - name: typeFSS + value: "'fss '" + - name: typeAEList + value: "'list'" + - name: typeAERecord + value: "'reco'" + - name: typeAppleEvent + value: "'aevt'" + - name: typeProcessSerialNumber + value: "'psn '" + - name: typeNull + value: "'null'" + - name: typeApplSignature + value: "'sign'" + - name: typeType + value: "'type'" + - name: typeWildCard + value: "'****'" + - name: typeAlias + value: "'alis'" + - name: typeBoolean + value: "'bool'" + - name: typeChar + value: "'TEXT'" + - name: typeSInt16 + value: "'shor'" + - name: typeSInt32 + value: "'long'" + - name: typeUInt32 + value: "'magn'" + - name: typeSInt64 + value: "'comp'" + - name: typeIEEE32BitFloatingPoint + value: "'sing'" + - name: typeIEEE64BitFloatingPoint + value: "'doub'" + - name: type128BitFloatingPoint + value: "'ldbl'" + - name: typeDecimalStruct + value: "'decm'" + comment: | + types + +# #### + +- enum: + values: + - name: keyAddressAttr + value: "'addr'" + - name: keyEventClassAttr + value: "'evcl'" + - name: keyEventIDAttr + value: "'evid'" + - name: keyProcessSerialNumber + value: "'psn '" + - name: keyDirectObject + value: "'----'" + +# #### + +- enum: + values: + - name: kCoreEventClass + value: "'aevt'" + - name: kAEOpenApplication + value: "'oapp'" + - name: kAEOpenDocuments + value: "'odoc'" + - name: kAEPrintDocuments + value: "'pdoc'" + - name: kAEAnswer + value: "'ansr'" + - name: kAEQuitApplication + value: "'quit'" + - name: keySelectProc + value: "'selh'" + +# #### + +- lowmem: + name: AE_info + type: AE_info_ptr + address: 0x2B6 + comment: | + AppleEvents AEGizmo (true); + +# #### + +- function: + name: AEGetCoercionHandler + return: OSErr + args: + - name: from_type + type: DescType + - name: to_type + type: DescType + - name: hdlr_out + type: AECoerceDescUPP* + - name: refcon_out + type: int32_t* + - name: from_type_is_desc_p_out + type: Boolean* + - name: system_handler_p + type: Boolean + comment: | + prototypes go here + dispatcher: Pack8 + selector: 0x0B24 + executor: C_ + +# #### + +- function: + name: AECreateDesc + return: OSErr + args: + - name: type + type: DescType + - name: data + type: void* + - name: data_size + type: Size + - name: desc_out + type: AEDesc* + dispatcher: Pack8 + selector: 0x0825 + executor: C_ + +# #### + +- function: + name: AEDisposeDesc + return: OSErr + args: + - name: desc + type: AEDesc* + dispatcher: Pack8 + selector: 0x0204 + executor: C_ + +# #### + +- function: + name: AECoerceDesc + return: OSErr + args: + - name: desc + type: AEDesc* + - name: result_type + type: DescType + - name: desc_out + type: AEDesc* + dispatcher: Pack8 + selector: 0x0603 + executor: C_ + +# #### + +- function: + name: AEGetParamPtr + return: OSErr + args: + - name: record + type: AERecord* + - name: keyword + type: AEKeyword + - name: desired_type + type: DescType + - name: type_out + type: DescType* + - name: data + type: Ptr + - name: max_size + type: Size + - name: size_out + type: Size* + dispatcher: Pack8 + selector: 0x0E11 + executor: C_ + +# #### + +- function: + name: AEGetParamDesc + return: OSErr + args: + - name: record + type: AERecord* + - name: keyword + type: AEKeyword + - name: desired_type + type: DescType + - name: desc_out + type: AEDesc* + dispatcher: Pack8 + selector: 0x0812 + executor: C_ + +# #### + +- function: + name: AEPutParamPtr + return: OSErr + args: + - name: record + type: AERecord* + - name: keyword + type: AEKeyword + - name: type + type: DescType + - name: data + type: Ptr + - name: data_size + type: Size + dispatcher: Pack8 + selector: 0x0A0F + executor: C_ + +# #### + +- function: + name: AEPutParamDesc + return: OSErr + args: + - name: record + type: AERecord* + - name: keyword + type: AEKeyword + - name: desc + type: AEDesc* + dispatcher: Pack8 + selector: 0x0610 + executor: C_ + +# #### + +- function: + name: AESizeOfParam + return: OSErr + args: + - name: record + type: AERecord* + - name: keyword + type: AEKeyword + - name: type_out + type: DescType* + - name: size_out + type: Size* + comment: | + extern OSErr C_AEDeleteParam(AppleEvent *evt, AEKeyword keyword); + PASCAL_SUBTRAP(AEDeleteParam, 0xA816, 0x0413, Pack8); + The following does not exist. Maybe it should be AEDeleteParam? + extern OSErr C_AEDeleteAttribute(AppleEvent *evt, + AEKeyword keyword); + PASCAL_SUBTRAP_UNKNOWN(AEDeleteAttribute, 0xA816, Pack8); + dispatcher: Pack8 + selector: 0x0829 + executor: C_ + +# #### + +- function: + name: AESetInteractionAllowed + return: OSErr + args: + - name: level + type: AEInteractionAllowed + dispatcher: Pack8 + selector: 0x011E + executor: C_ + +# #### + +- function: + name: AEResetTimer + return: OSErr + args: + - name: evt + type: AppleEvent* + dispatcher: Pack8 + selector: 0x0219 + executor: C_ + +# #### + +- function: + name: AEGetTheCurrentEvent + return: OSErr + args: + - name: return_evt + type: AppleEvent* + dispatcher: Pack8 + selector: 0x021A + executor: C_ + +# #### + +- function: + name: AESetTheCurrentEvent + return: OSErr + args: + - name: evt + type: AppleEvent* + dispatcher: Pack8 + selector: 0x022C + executor: C_ + +# #### + +- function: + name: AESuspendTheCurrentEvent + return: OSErr + args: + - name: evt + type: AppleEvent* + dispatcher: Pack8 + selector: 0x022B + executor: C_ + +# #### + +- function: + name: AEResumeTheCurrentEvent + return: OSErr + args: + - name: evt + type: AppleEvent* + - name: reply + type: AppleEvent* + - name: dispatcher + type: AEEventHandlerUPP + - name: refcon + type: int32_t + dispatcher: Pack8 + selector: 0x0818 + executor: C_ + +# #### + +- function: + name: AEGetInteractionAllowed + return: OSErr + args: + - name: return_level + type: AEInteractionAllowed* + dispatcher: Pack8 + selector: 0x021D + executor: C_ + +# #### + +- function: + name: AEDuplicateDesc + return: OSErr + args: + - name: src + type: AEDesc* + - name: dst + type: AEDesc* + dispatcher: Pack8 + selector: 0x0405 + executor: C_ + +# #### + +- function: + name: AECountItems + return: OSErr + args: + - name: list + type: AEDescList* + - name: count_out + type: int32_t* + dispatcher: Pack8 + selector: 0x0407 + executor: C_ + +# #### + +- function: + name: AEDeleteItem + return: OSErr + args: + - name: list + type: AEDescList* + - name: index + type: int32_t + dispatcher: Pack8 + selector: 0x040E + executor: C_ + +# #### + +- function: + name: AEDeleteParam + return: OSErr + args: + - name: record + type: AERecord* + - name: keyword + type: AEKeyword + dispatcher: Pack8 + selector: 0x0413 + executor: C_ + +# #### + +- function: + name: AEInstallSpecialHandler + return: OSErr + args: + - name: function_class + type: AEKeyword + - name: hdlr + type: AEEventHandlerUPP + - name: system_handler_p + type: Boolean + dispatcher: Pack8 + selector: 0x0500 + executor: C_ + +# #### + +- function: + name: AERemoveSpecialHandler + return: OSErr + args: + - name: function_class + type: AEKeyword + - name: hdlr + type: AEEventHandlerUPP + - name: system_handler_p + type: Boolean + dispatcher: Pack8 + selector: 0x0501 + executor: C_ + +# #### + +- function: + name: AEGetSpecialHandler + return: OSErr + args: + - name: function_class + type: AEKeyword + - name: hdlr_out + type: AEEventHandlerUPP* + - name: system_handler_p + type: Boolean + dispatcher: Pack8 + selector: 0x052D + executor: C_ + +# #### + +- function: + name: AESend + return: OSErr + args: + - name: evt + type: AppleEvent* + - name: reply + type: AppleEvent* + - name: send_mode + type: AESendMode + - name: send_priority + type: AESendPriority + - name: timeout + type: int32_t + - name: idle_proc + type: IdleUPP + - name: filter_proc + type: EventFilterUPP + dispatcher: Pack8 + selector: 0x0D17 + executor: C_ + +# #### + +- function: + name: AECoercePtr + return: OSErr + args: + - name: data_type + type: DescType + - name: data + type: Ptr + - name: data_size + type: Size + - name: result_type + type: DescType + - name: desc_out + type: AEDesc* + dispatcher: Pack8 + selector: 0x0A02 + executor: C_ + +# #### + +- function: + name: AEGetEventHandler + return: OSErr + args: + - name: event_class + type: AEEventClass + - name: event_id + type: AEEventID + - name: hdlr + type: AEEventHandlerUPP* + - name: refcon + type: int32_t* + - name: system_handler_p + type: Boolean + dispatcher: Pack8 + selector: 0x0921 + executor: C_ + +# #### + +- function: + name: AERemoveEventHandler + return: OSErr + args: + - name: event_class + type: AEEventClass + - name: event_id + type: AEEventID + - name: hdlr + type: AEEventHandlerUPP + - name: system_handler_p + type: Boolean + dispatcher: Pack8 + selector: 0x0720 + executor: C_ + +# #### + +- function: + name: AEProcessAppleEvent + return: OSErr + args: + - name: evt + type: EventRecord* + dispatcher: Pack8 + selector: 0x021B + executor: C_ + +# #### + +- function: + name: AEPutDesc + return: OSErr + args: + - name: list + type: AEDescList* + - name: index + type: int32_t + - name: desc + type: AEDesc* + dispatcher: Pack8 + selector: 0x0609 + executor: C_ + +# #### + +- function: + name: AEPutAttributePtr + return: OSErr + args: + - name: evt + type: AppleEvent* + - name: keyword + type: AEKeyword + - name: type + type: DescType + - name: data + type: Ptr + - name: size + type: Size + dispatcher: Pack8 + selector: 0x0A16 + executor: C_ + +# #### + +- function: + name: AEPutAttributeDesc + return: OSErr + args: + - name: evt + type: AppleEvent* + - name: keyword + type: AEKeyword + - name: desc + type: AEDesc* + dispatcher: Pack8 + selector: 0x0627 + executor: C_ + +# #### + +- function: + name: AEGetNthPtr + return: OSErr + args: + - name: list + type: AEDescList* + - name: index + type: int32_t + - name: desired_type + type: DescType + - name: keyword_out + type: AEKeyword* + - name: type_out + type: DescType* + - name: data + type: Ptr + - name: max_size + type: int32_t + - name: size_out + type: int32_t* + dispatcher: Pack8 + selector: 0x100A + executor: C_ + +# #### + +- function: + name: AEGetAttributePtr + return: OSErr + args: + - name: evt + type: AppleEvent* + - name: keyword + type: AEKeyword + - name: desired_type + type: DescType + - name: type_out + type: DescType* + - name: data + type: Ptr + - name: max_size + type: Size + - name: size_out + type: Size* + dispatcher: Pack8 + selector: 0x0E15 + executor: C_ + +# #### + +- function: + name: AEGetArray + return: OSErr + args: + - name: list + type: AEDescList* + - name: array_type + type: AEArrayType + - name: array_ptr + type: AEArrayDataPointer + - name: max_size + type: Size + - name: return_item_type + type: DescType* + - name: return_item_size + type: Size* + - name: return_item_count + type: int32_t* + dispatcher: Pack8 + selector: 0x0D0C + executor: C_ + +# #### + +- function: + name: AECreateAppleEvent + return: OSErr + args: + - name: event_class + type: AEEventClass + - name: event_id + type: AEEventID + - name: target + type: AEAddressDesc* + - name: return_id + type: int16_t + - name: transaction_id + type: int32_t + - name: evt + type: AppleEvent* + dispatcher: Pack8 + selector: 0x0B14 + executor: C_ + +# #### + +- function: + name: AEInstallCoercionHandler + return: OSErr + args: + - name: from_type + type: DescType + - name: to_type + type: DescType + - name: hdlr + type: AECoerceDescUPP + - name: refcon + type: int32_t + - name: from_type_is_desc_p + type: Boolean + - name: system_handler_p + type: Boolean + dispatcher: Pack8 + selector: 0x0A22 + executor: C_ + +# #### + +- function: + name: AEInstallEventHandler + return: OSErr + args: + - name: event_class + type: AEEventClass + - name: event_id + type: AEEventID + - name: hdlr + type: AEEventHandlerUPP + - name: refcon + type: int32_t + - name: system_handler_p + type: Boolean + dispatcher: Pack8 + selector: 0x091F + executor: C_ + +# #### + +- function: + name: AERemoveCoercionHandler + return: OSErr + args: + - name: from_type + type: DescType + - name: to_type + type: DescType + - name: hdlr + type: AECoerceDescUPP + - name: system_handler_p + type: Boolean + dispatcher: Pack8 + selector: 0x0723 + executor: C_ + +# #### + +- function: + name: AEPutArray + return: OSErr + args: + - name: list + type: AEDescList* + - name: type + type: AEArrayType + - name: array_data + type: AEArrayDataPointer + - name: item_type + type: DescType + - name: item_size + type: Size + - name: item_count + type: int32_t + dispatcher: Pack8 + selector: 0x0B0D + executor: C_ + +# #### + +- function: + name: AECreateList + return: OSErr + args: + - name: list_elt_prefix + type: Ptr + - name: list_elt_prefix_size + type: Size + - name: is_record_p + type: Boolean + - name: list_out + type: AEDescList* + dispatcher: Pack8 + selector: 0x0706 + executor: C_ + +# #### + +- function: + name: AEGetAttributeDesc + return: OSErr + args: + - name: evt + type: AppleEvent* + - name: keyword + type: AEKeyword + - name: desired_type + type: DescType + - name: desc_out + type: AEDesc* + dispatcher: Pack8 + selector: 0x0826 + executor: C_ + +# #### + +- function: + name: AESizeOfAttribute + return: OSErr + args: + - name: evt + type: AppleEvent* + - name: keyword + type: AEKeyword + - name: type_out + type: DescType* + - name: size_out + type: Size* + dispatcher: Pack8 + selector: 0x0828 + executor: C_ + +# #### + +- function: + name: AEGetNthDesc + return: OSErr + args: + - name: list + type: AEDescList* + - name: index + type: int32_t + - name: desired_type + type: DescType + - name: keyword_out + type: AEKeyword* + - name: desc_out + type: AEDesc* + dispatcher: Pack8 + selector: 0x0A0B + executor: C_ + +# #### + +- function: + name: AESizeOfNthItem + return: OSErr + args: + - name: list + type: AEDescList* + - name: index + type: int32_t + - name: type_out + type: DescType* + - name: size_out + type: Size* + dispatcher: Pack8 + selector: 0x082A + executor: C_ + +# #### + +- function: + name: AEPutPtr + return: OSErr + args: + - name: list + type: AEDescList* + - name: index + type: int32_t + - name: type + type: DescType + - name: data + type: Ptr + - name: data_size + type: Size + dispatcher: Pack8 + selector: 0x0A08 + executor: C_ + +# #### + +- function: + name: AEInteractWithUser + return: OSErr + args: + - name: timeout + type: int32_t + - name: nm_req + type: NMRecPtr + - name: idle_proc + type: IdleUPP + dispatcher: Pack8 + selector: 0x061C + executor: C_ + +# #### + +- function: + name: AEManagerInfo + return: OSErr + args: + - name: resultp + type: LONGINT* + dispatcher: Pack8 + selector: 0x0441 + executor: C_ + +# #### + +- function: + name: AEDisposeToken + return: OSErr + args: + - name: theToken + type: AEDesc* + dispatcher: Pack8 + selector: 0x023A + executor: C_ + +# #### + +- function: + name: AEResolve + return: OSErr + args: + - name: objectSpecifier + type: AEDesc* + - name: callbackFlags + type: INTEGER + - name: theToken + type: AEDesc* + dispatcher: Pack8 + selector: 0x0536 + executor: C_ + +# #### + +- function: + name: AERemoveObjectAccessor + return: OSErr + args: + - name: desiredClass + type: DescType + - name: containerType + type: DescType + - name: theAccessor + type: ProcPtr + - name: isSysHandler + type: Boolean + dispatcher: Pack8 + selector: 0x0738 + executor: C_ + +# #### + +- function: + name: AEInstallObjectAccessor + return: OSErr + args: + - name: desiredClass + type: DescType + - name: containerType + type: DescType + - name: theAccessor + type: ProcPtr + - name: refcon + type: LONGINT + - name: isSysHandler + type: Boolean + dispatcher: Pack8 + selector: 0x0937 + executor: C_ + +# #### + +- function: + name: AEGetObjectAccessor + return: OSErr + args: + - name: desiredClass + type: DescType + - name: containerType + type: DescType + - name: theAccessor + type: ProcPtr* + - name: accessorRefcon + type: LONGINT* + - name: isSysHandler + type: Boolean + dispatcher: Pack8 + selector: 0x0939 + executor: C_ + +# #### + +- function: + name: AECallObjectAccessor + return: OSErr + args: + - name: desiredClass + type: DescType + - name: containerToken + type: AEDesc* + - name: containerClass + type: DescType + - name: keyForm + type: DescType + - name: keyData + type: AEDesc* + - name: theToken + type: AEDesc* + dispatcher: Pack8 + selector: 0x0C3B + executor: C_ + +# #### + +- function: + name: AESetObjectCallbacks + return: OSErr + args: + - name: myCompareProc + type: ProcPtr + - name: myCountProc + type: ProcPtr + - name: myDisposeTokenProc + type: ProcPtr + - name: myGetMarkTokenProc + type: ProcPtr + - name: myMarkProc + type: ProcPtr + - name: myAdjustMarksProc + type: ProcPtr + - name: myGetErrDescProc + type: ProcPtr + dispatcher: Pack8 + selector: 0x0E35 + executor: C_ diff --git a/defs/AppleTalk.yaml b/defs/AppleTalk.yaml new file mode 100644 index 0000000..0c50a9f --- /dev/null +++ b/defs/AppleTalk.yaml @@ -0,0 +1,24 @@ +- lowmem: + name: PortBUse + type: Byte + address: 0x291 + comment: | + AppleTalk IMII-305 (true-b); + +# #### + +- lowmem: + name: ABusVars + type: Ptr + address: 0x2D8 + comment: | + AppleTalk IMII-328 (false); + +# #### + +- lowmem: + name: ABusDCE + type: Ptr + address: 0x2DC + comment: | + AppleTalk MPW (false); diff --git a/defs/BinaryDecimal.yaml b/defs/BinaryDecimal.yaml new file mode 100644 index 0000000..f2982d2 --- /dev/null +++ b/defs/BinaryDecimal.yaml @@ -0,0 +1,27 @@ +- function: + name: NumToString + args: + - name: l + type: LONGINT + register: D0 + - name: s + type: StringPtr + register: A0 + executor: C_ + dispatcher: Pack7 + selector: 0x0000 + +# #### + +- function: + name: StringToNum + args: + - name: s + type: ConstStringPtr + register: A0 + - name: lp + type: LONGINT* + register: Out + executor: C_ + dispatcher: Pack7 + selector: 0x0001 diff --git a/defs/CQuickDraw.yaml b/defs/CQuickDraw.yaml new file mode 100644 index 0000000..019049f --- /dev/null +++ b/defs/CQuickDraw.yaml @@ -0,0 +1,2133 @@ +- executor_only: + code: | + #define theCPort (**(GUEST *> *)SYN68K_TO_US(EM_A5)) + #define theCPortX (**(GUEST *> *)SYN68K_TO_US(EM_A5)) + +# #### + +- enum: + values: + - name: minSeed + value: 1024 + +# #### + +- struct: + name: ITab + members: + - name: iTabSeed + type: LONGINT + - name: iTabRes + type: INTEGER + - name: iTTable + type: uint8_t[1] + size: 8 + +# #### + +- typedef: + name: ITabPtr + type: ITab* + comment: | + can't use [0]; + make this an unsigned char even tho the mac has SignedByte; + it is treated as unsigned + +# #### + +- typedef: + name: ITabHandle + type: ITabPtr* + +# #### + +- struct: + name: GDevice + +# #### + +- typedef: + name: GDPtr + type: GDevice* + +# #### + +- typedef: + name: GDevicePtr + type: GDPtr + +# #### + +- typedef: + name: GDHandle + type: GDevicePtr* + +# #### + +- struct: + name: SProcRec + +# #### + +- typedef: + name: SProcPtr + type: SProcRec* + +# #### + +- typedef: + name: SProcHndl + type: SProcPtr* + +# #### + +- struct: + name: SProcRec + members: + - name: nxtSrch + type: SProcHndl + - name: srchProc + type: ProcPtr + size: 8 + +# #### + +- struct: + name: CProcRec + +# #### + +- typedef: + name: CProcPtr + type: CProcRec* + +# #### + +- typedef: + name: CProcHndl + type: CProcPtr* + +# #### + +- struct: + name: CProcRec + members: + - name: nxtComp + type: CProcHndl + - name: compProc + type: ProcPtr + size: 8 + +# #### + +- funptr: + args: + - name: depth + type: INTEGER + - name: deviceFlags + type: INTEGER + - name: targetDevice + type: GDHandle + - name: userData + type: LONGINT + name: DeviceLoopDrawingUPP + +# #### + +- struct: + name: GDevice + members: + - name: gdRefNum + type: INTEGER + - name: gdID + type: INTEGER + - name: gdType + type: INTEGER + - name: gdITable + type: ITabHandle + - name: gdResPref + type: INTEGER + - name: gdSearchProc + type: SProcHndl + - name: gdCompProc + type: CProcHndl + - name: gdFlags + type: INTEGER + - name: gdPMap + type: PixMapHandle + - name: gdRefCon + type: LONGINT + - name: gdNextGD + type: GDHandle + - name: gdRect + type: Rect + - name: gdMode + type: LONGINT + - name: gdCCBytes + type: INTEGER + - name: gdCCDepth + type: INTEGER + - name: gdCCXData + type: Handle + - name: gdCCXMask + type: Handle + - name: gdReserved + type: LONGINT + size: 62 + +# #### + +- typedef: + name: DeviceLoopFlags + type: uint32_t + +# #### + +- enum: + values: + - name: singleDevices + value: 1 << 0 + - name: dontMatchSeeds + value: 1 << 1 + - name: allDevices + value: 1 << 2 + comment: | + DeviceLoop flags. + +# #### + +- struct: + name: ColorInfo + members: + - name: ciRGB + type: RGBColor + - name: ciUsage + type: INTEGER + - name: ciTolerance + type: INTEGER + - name: ciFlags + type: INTEGER + - name: ciPrivate + type: LONGINT + size: 16 + +# #### + +- struct: + name: Palette + members: + - name: pmEntries + type: INTEGER + - name: pmWindow + type: GrafPtr + - name: pmPrivate + type: INTEGER + - name: pmDevices + type: LONGINT + comment: | + Handle? + - name: pmSeeds + type: Handle + - name: pmInfo + type: ColorInfo[1] + size: 32 + +# #### + +- typedef: + name: PalettePtr + type: Palette* + +# #### + +- enum: + values: + - name: CI_USAGE_TYPE_BITS + value: 0xF + +# #### + +- enum: + values: + - name: pmCourteous + value: 0 + - name: pmDithered + value: 1 + - name: pmTolerant + value: 2 + - name: pmAnimated + value: 4 + - name: pmExplicit + value: 8 + - name: pmInhibitG2 + value: 0x0100 + - name: pmInhibitC2 + value: 0x0200 + - name: pmInhibitG4 + value: 0x0400 + - name: pmInhibitC4 + value: 0x0800 + - name: pmInhibitG8 + value: 0x1000 + - name: pmInhibitC8 + value: 0x2000 + name: pmColorUsage + +# #### + +- enum: + values: + - name: pmNoUpdates + value: 0x8000 + - name: pmBkUpdates + value: 0xA000 + - name: pmFgUpdates + value: 0xC000 + - name: pmAllUpdates + value: 0xE000 + name: pmUpdates + +# #### + +- typedef: + name: PaletteHandle + type: PalettePtr* + +# #### + +- executor_only: + code: | + /* return true if `maybe_graphics_world' points to a graphics world, + and not a graf port or cgraf port */ + #define GRAPHICS_WORLD_P(maybe_graphics_world) \ + (CGrafPort_p(maybe_graphics_world) \ + && CPORT_VERSION(maybe_graphics_world) & GW_FLAG_BIT) + #define GW_CPORT(graphics_world) ((CGrafPtr)(graphics_world)) + +# #### + +- typedef: + name: GWorldFlags + type: LONGINT + +# #### + +- typedef: + name: GWorld + type: CGrafPort + +# #### + +- typedef: + name: GWorldPtr + type: CGrafPort* + +# #### + +- struct: + name: ReqListRec + members: + - name: reqLSize + type: INTEGER + - name: reqLData + type: INTEGER[1] + size: 4 + +# #### + +- struct: + name: OpenCPicParams + members: + - name: srcRect + type: Rect + - name: hRes + type: Fixed + - name: vRes + type: Fixed + - name: version + type: int16_t + - name: reserved1 + type: int16_t + - name: reserved2 + type: int32_t + comment: | + extended version 2 picture datastructures + size: 24 + +# #### + +- struct: + name: CommonSpec + members: + - name: count + type: int16_t + - name: ID + type: int16_t + +# #### + +- typedef: + name: CommentSpec + type: CommonSpec + size: 4 + +# #### + +- typedef: + name: CommentSpecPtr + type: CommentSpec* + +# #### + +- typedef: + name: CommentSpecHandle + type: CommentSpecPtr* + +# #### + +- struct: + name: FontSpec + members: + - name: pictFontID + type: int16_t + - name: sysFontID + type: int16_t + - name: size + type: int32_t[4] + - name: style + type: int16_t + - name: nameOffset + type: int32_t + size: 26 + +# #### + +- typedef: + name: FontSpecPtr + type: FontSpec* + +# #### + +- typedef: + name: FontSpecHandle + type: FontSpecPtr* + +# #### + +- struct: + name: PictInfo + members: + - name: version + type: int16_t + comment: | + 0 + - name: uniqueColors + type: int32_t + comment: | + 2 + - name: thePalette + type: PaletteHandle + comment: | + 6 + - name: theColorTable + type: CTabHandle + comment: | + 10 + - name: hRes + type: Fixed + comment: | + 14 + - name: vRes + type: Fixed + comment: | + 18 + - name: depth + type: INTEGER + comment: | + 22 + - name: sourceRect + type: Rect + comment: | + top24, left26, bottom28, right30 + - name: textCount + type: int32_t + comment: | + 32 + - name: lineCount + type: int32_t + - name: rectCount + type: int32_t + - name: rRectCount + type: int32_t + - name: ovalCount + type: int32_t + - name: arcCount + type: int32_t + - name: polyCount + type: int32_t + - name: regionCount + type: int32_t + - name: bitMapCount + type: int32_t + - name: pixMapCount + type: int32_t + - name: commentCount + type: int32_t + - name: uniqueComments + type: int32_t + - name: commentHandle + type: CommentSpecHandle + - name: uniqueFonts + type: int32_t + - name: fontHandle + type: FontSpecHandle + - name: fontNamesHandle + type: Handle + - name: reserved1 + type: int32_t + - name: reserved2 + type: int32_t + size: 104 + +# #### + +- typedef: + name: PictInfoPtr + type: PictInfo* + +# #### + +- typedef: + name: PictInfoHandle + type: PictInfoPtr* + +# #### + +- typedef: + name: PictInfoID + type: int32_t + +# #### + +- enum: + values: + - name: RGBDirect + value: 0x10 + - name: Indirect + value: 0 + +# #### + +- enum: + values: + - name: vdriver_rgb_pixel_type + value: 0xB9 + comment: | + a pixmap pixelType of `native_rgb_pixel_type' means that the format + of the pixmap is the same as that of the screen + +# #### + +- enum: + values: + - name: pixPurge + value: 1 << 0 + - name: noNewDevice + value: 1 << 1 + - name: useTempMem + value: 1 << 2 + - name: keepLocal + value: 1 << 3 + - name: pixelsPurgeable + value: 1 << 6 + - name: pixelsLocked + value: 1 << 7 + - name: mapPix + value: 1 << 16 + - name: newDepth + value: 1 << 17 + - name: alignPix + value: 1 << 18 + - name: newRowBytes + value: 1 << 19 + - name: reallocPix + value: 1 << 20 + - name: clipPix + value: 1 << 28 + - name: stretchPix + value: 1 << 29 + - name: ditherPix + value: 1 << 30 + - name: gwFlagErr + value: 1 << 31 + +# #### + +- typedef: + name: QDErr + type: int16_t + +# #### + +- enum: + values: + - name: noMemForPictPlaybackErr + value: -145 + - name: regionTooBigErr + value: -147 + - name: pixmapTooDeepErr + value: -148 + - name: nsStackErr + value: -149 + - name: cMatchErr + value: -150 + - name: cTempMemErr + value: -151 + - name: cNoMemErr + value: -152 + - name: cRangeErr + value: -153 + - name: cProtectErr + value: -154 + - name: cDevErr + value: -155 + - name: cResErr + value: -156 + - name: cDepthErr + value: -157 + - name: rgnTooBigErr + value: -500 + comment: | + error codes returned by QDError + +# #### + +- enum: + values: + - name: colReqErr + value: -158 + comment: | + TODO: FIXME -- #warning find out correct value for colReqErr + -158 is just a guess + +# #### + +- lowmem: + name: TheGDevice + type: GDHandle + address: 0xCC8 + comment: | + QuickDraw IMV (true); + +# #### + +- lowmem: + name: MainDevice + type: GDHandle + address: 0x8A4 + comment: | + QuickDraw IMV (true); + +# #### + +- lowmem: + name: DeviceList + type: GDHandle + address: 0x8A8 + comment: | + QuickDraw IMV (true); + +# #### + +- lowmem: + name: HiliteRGB + type: RGBColor + address: 0xDA0 + comment: | + QuickDraw IMV-62 (true); + +# #### + +- dispatcher: + name: PaletteDispatch + trap: 0xAAA2 + selector-location: D0<0xFF> + comment: | + D0W? D0<0xFF> ### + +# #### + +- dispatcher: + name: Pack12 + trap: 0xA82E + selector-location: StackW + +# #### + +- dispatcher: + name: QDExtensions + trap: 0xAB1D + selector-location: D0L + +# #### + +- dispatcher: + name: Pack15 + trap: 0xA831 + selector-location: D0W + comment: | + D0<0xFF>? ### + +# #### + +- function: + name: SetStdCProcs + args: + - name: cProcs + type: CQDProcs* + trap: 0xAA4E + executor: C_ + +# #### + +- function: + name: OpenCPort + args: + - type: CGrafPtr + trap: 0xAA00 + executor: C_ + +# #### + +- function: + name: InitCPort + args: + - type: CGrafPtr + trap: 0xAA01 + executor: C_ + +# #### + +- function: + name: CloseCPort + args: + - type: CGrafPtr + trap: 0xAA02 + executor: C_ + +# #### + +- function: + name: RGBForeColor + args: + - type: RGBColor* + trap: 0xAA14 + executor: C_ + +# #### + +- function: + name: RGBBackColor + args: + - type: RGBColor* + trap: 0xAA15 + executor: C_ + +# #### + +- function: + name: GetForeColor + args: + - type: RGBColor* + trap: 0xAA19 + executor: C_ + +# #### + +- function: + name: GetBackColor + args: + - type: RGBColor* + trap: 0xAA1A + executor: C_ + +# #### + +- function: + name: PenPixPat + args: + - type: PixPatHandle + trap: 0xAA0A + executor: C_ + +# #### + +- function: + name: BackPixPat + args: + - type: PixPatHandle + trap: 0xAA0B + executor: C_ + +# #### + +- function: + name: OpColor + args: + - type: RGBColor* + trap: 0xAA21 + executor: C_ + +# #### + +- function: + name: HiliteColor + args: + - type: RGBColor* + trap: 0xAA22 + executor: C_ + +# #### + +- function: + name: NewPixMap + return: PixMapHandle + trap: 0xAA03 + executor: C_ + +# #### + +- function: + name: DisposePixMap + args: + - type: PixMapHandle + trap: 0xAA04 + executor: C_ + +# #### + +- function: + name: CopyPixMap + args: + - type: PixMapHandle + - type: PixMapHandle + trap: 0xAA05 + executor: C_ + +# #### + +- function: + name: NewPixPat + return: PixPatHandle + trap: 0xAA07 + executor: C_ + +# #### + +- function: + name: DisposePixPat + args: + - type: PixPatHandle + trap: 0xAA08 + executor: C_ + +# #### + +- function: + name: CopyPixPat + args: + - type: PixPatHandle + - type: PixPatHandle + trap: 0xAA09 + executor: C_ + +# #### + +- function: + name: SetPortPix + args: + - type: PixMapHandle + trap: 0xAA06 + executor: C_ + +# #### + +- function: + name: NewGDevice + return: GDHandle + args: + - type: INTEGER + - type: LONGINT + trap: 0xAA2F + executor: C_ + +# #### + +- function: + name: InitGDevice + args: + - type: INTEGER + - type: LONGINT + - type: GDHandle + trap: 0xAA2E + executor: C_ + +# #### + +- function: + name: SetDeviceAttribute + args: + - type: GDHandle + - type: INTEGER + - type: Boolean + trap: 0xAA2D + executor: C_ + +# #### + +- function: + name: SetGDevice + args: + - type: GDHandle + trap: 0xAA31 + executor: C_ + +# #### + +- function: + name: DisposeGDevice + args: + - type: GDHandle + trap: 0xAA30 + executor: C_ + +# #### + +- function: + name: GetGDevice + return: GDHandle + trap: 0xAA32 + executor: C_ + +# #### + +- function: + name: GetDeviceList + return: GDHandle + trap: 0xAA29 + executor: C_ + +# #### + +- function: + name: GetMainDevice + return: GDHandle + trap: 0xAA2A + executor: C_ + +# #### + +- function: + name: GetMaxDevice + return: GDHandle + args: + - type: const Rect* + trap: 0xAA27 + executor: C_ + +# #### + +- function: + name: GetNextDevice + return: GDHandle + args: + - type: GDHandle + trap: 0xAA2B + executor: C_ + +# #### + +- function: + name: DeviceLoop + args: + - type: RgnHandle + - type: DeviceLoopDrawingUPP + - type: LONGINT + - type: DeviceLoopFlags + trap: 0xABCA + executor: C_ + +# #### + +- function: + name: TestDeviceAttribute + return: Boolean + args: + - type: GDHandle + - type: INTEGER + trap: 0xAA2C + executor: C_ + +# #### + +- function: + name: ScreenRes + args: + - type: INTEGER* + - type: INTEGER* + executor: C_ + +# #### + +- function: + name: HasDepth + return: INTEGER + args: + - type: GDHandle + - type: INTEGER + - type: INTEGER + - type: INTEGER + dispatcher: PaletteDispatch + selector: 0x0A14 + executor: C_ + +# #### + +- function: + name: SetDepth + return: OSErr + args: + - type: GDHandle + - type: INTEGER + - type: INTEGER + - type: INTEGER + dispatcher: PaletteDispatch + selector: 0x0A13 + executor: C_ + +# #### + +- function: + name: MakeITable + args: + - type: CTabHandle + - type: ITabHandle + - type: INTEGER + trap: 0xAA39 + executor: C_ + +# #### + +- function: + name: Color2Index + return: LONGINT + args: + - type: RGBColor* + trap: 0xAA33 + executor: C_ + +# #### + +- function: + name: Index2Color + args: + - type: LONGINT + - type: RGBColor* + trap: 0xAA34 + executor: C_ + +# #### + +- function: + name: GetCTSeed + return: LONGINT + trap: 0xAA28 + executor: C_ + +# #### + +- function: + name: GetSubTable + args: + - type: CTabHandle + - type: INTEGER + - type: CTabHandle + trap: 0xAA37 + executor: C_ + +# #### + +- function: + name: FillCRoundRect + args: + - type: const Rect* + - type: int16_t + - type: int16_t + - type: PixPatHandle + trap: 0xAA10 + executor: C_ + +# #### + +- function: + name: FillCRect + args: + - type: const Rect* + - type: PixPatHandle + trap: 0xAA0E + executor: C_ + +# #### + +- function: + name: FillCOval + args: + - type: const Rect* + - type: PixPatHandle + trap: 0xAA0F + executor: C_ + +# #### + +- function: + name: FillCArc + args: + - type: const Rect* + - type: int16_t + - type: int16_t + - type: PixPatHandle + trap: 0xAA11 + executor: C_ + +# #### + +- function: + name: FillCPoly + args: + - type: PolyHandle + - type: PixPatHandle + trap: 0xAA13 + executor: C_ + +# #### + +- function: + name: FillCRgn + args: + - type: RgnHandle + - type: PixPatHandle + trap: 0xAA12 + executor: C_ + +# #### + +- function: + name: InvertColor + args: + - type: RGBColor* + trap: 0xAA35 + executor: C_ + +# #### + +- function: + name: RealColor + return: Boolean + args: + - type: RGBColor* + trap: 0xAA36 + executor: C_ + +# #### + +- function: + name: ProtectEntry + args: + - type: INTEGER + - type: Boolean + trap: 0xAA3D + executor: C_ + +# #### + +- function: + name: ReserveEntry + args: + - type: INTEGER + - type: Boolean + trap: 0xAA3E + executor: C_ + +# #### + +- function: + name: SetEntries + args: + - type: INTEGER + - type: INTEGER + - name: cSpecArray + type: ColorSpec* + trap: 0xAA3F + executor: C_ + +# #### + +- function: + name: AddSearch + args: + - type: ProcPtr + trap: 0xAA3A + executor: C_ + +# #### + +- function: + name: AddComp + args: + - type: ProcPtr + trap: 0xAA3B + executor: C_ + +# #### + +- function: + name: DelSearch + args: + - type: ProcPtr + trap: 0xAA4C + executor: C_ + +# #### + +- function: + name: DelComp + args: + - type: ProcPtr + trap: 0xAA4D + executor: C_ + +# #### + +- function: + name: SetClientID + args: + - type: INTEGER + trap: 0xAA3C + executor: C_ + +# #### + +- function: + name: GetGray + return: Boolean + args: + - type: GDHandle + - type: RGBColor* + - type: RGBColor* + dispatcher: PaletteDispatch + selector: 0x0C19 + executor: C_ + +# #### + +- function: + name: GetPixPat + return: PixPatHandle + args: + - type: INTEGER + trap: 0xAA0C + executor: C_ + +# #### + +- function: + name: QDError + return: INTEGER + trap: 0xAA40 + executor: C_ + +# #### + +- function: + name: CMY2RGB + args: + - type: CMYColor* + - type: RGBColor* + dispatcher: Pack12 + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: RGB2CMY + args: + - type: RGBColor* + - type: CMYColor* + dispatcher: Pack12 + selector: 0x0004 + executor: C_ + +# #### + +- function: + name: HSL2RGB + args: + - type: HSLColor* + - type: RGBColor* + dispatcher: Pack12 + selector: 0x0005 + executor: C_ + +# #### + +- function: + name: RGB2HSL + args: + - type: RGBColor* + - type: HSLColor* + dispatcher: Pack12 + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: HSV2RGB + args: + - type: HSVColor* + - type: RGBColor* + dispatcher: Pack12 + selector: 0x0007 + executor: C_ + +# #### + +- function: + name: RGB2HSV + args: + - type: RGBColor* + - type: HSVColor* + dispatcher: Pack12 + selector: 0x0008 + executor: C_ + +# #### + +- function: + name: Fix2SmallFract + return: SmallFract + args: + - type: Fixed + dispatcher: Pack12 + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: SmallFract2Fix + return: Fixed + args: + - type: SmallFract + dispatcher: Pack12 + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: GetColor + return: Boolean + args: + - type: Point + - type: Str255 + - type: RGBColor* + - type: RGBColor* + dispatcher: Pack12 + selector: 0x0009 + executor: C_ + +# #### + +- function: + name: GetCTable + return: CTabHandle + args: + - type: INTEGER + trap: 0xAA18 + executor: C_ + +# #### + +- function: + name: DisposeCTable + args: + - type: CTabHandle + trap: 0xAA24 + executor: C_ + +# #### + +- function: + name: InitPalettes + trap: 0xAA90 + executor: C_ + +# #### + +- function: + name: NewPalette + return: PaletteHandle + args: + - type: INTEGER + - type: CTabHandle + - type: INTEGER + - type: INTEGER + trap: 0xAA91 + executor: C_ + +# #### + +- function: + name: GetNewPalette + return: PaletteHandle + args: + - type: INTEGER + trap: 0xAA92 + executor: C_ + +# #### + +- function: + name: DisposePalette + args: + - type: PaletteHandle + trap: 0xAA93 + executor: C_ + +# #### + +- function: + name: ActivatePalette + args: + - type: WindowPtr + trap: 0xAA94 + executor: C_ + +# #### + +- function: + name: SetPalette + args: + - type: WindowPtr + - type: PaletteHandle + - type: Boolean + executor: C_ + +# #### + +- function: + name: NSetPalette + args: + - type: WindowPtr + - type: PaletteHandle + - name: updates + type: INTEGER + trap: 0xAA95 + executor: C_ + +# #### + +- function: + name: GetPalette + return: PaletteHandle + args: + - type: WindowPtr + trap: 0xAA96 + executor: C_ + +# #### + +- function: + name: PmForeColor + args: + - type: INTEGER + trap: 0xAA97 + executor: C_ + +# #### + +- function: + name: PmBackColor + args: + - type: INTEGER + trap: 0xAA98 + executor: C_ + +# #### + +- function: + name: AnimateEntry + args: + - type: WindowPtr + - type: INTEGER + - type: RGBColor* + trap: 0xAA99 + executor: C_ + +# #### + +- function: + name: AnimatePalette + args: + - type: WindowPtr + - type: CTabHandle + - type: INTEGER + - type: INTEGER + - type: INTEGER + trap: 0xAA9A + executor: C_ + +# #### + +- function: + name: GetEntryColor + args: + - type: PaletteHandle + - type: INTEGER + - type: RGBColor* + trap: 0xAA9B + executor: C_ + +# #### + +- function: + name: SetEntryColor + args: + - type: PaletteHandle + - type: INTEGER + - type: RGBColor* + trap: 0xAA9C + executor: C_ + +# #### + +- function: + name: GetEntryUsage + args: + - type: PaletteHandle + - type: INTEGER + - type: INTEGER* + - type: INTEGER* + trap: 0xAA9D + executor: C_ + +# #### + +- function: + name: SetEntryUsage + args: + - type: PaletteHandle + - type: INTEGER + - type: INTEGER + - type: INTEGER + trap: 0xAA9E + executor: C_ + +# #### + +- function: + name: CTab2Palette + args: + - type: CTabHandle + - type: PaletteHandle + - type: INTEGER + - type: INTEGER + trap: 0xAA9F + executor: C_ + +# #### + +- function: + name: Palette2CTab + args: + - type: PaletteHandle + - type: CTabHandle + trap: 0xAAA0 + executor: C_ + +# #### + +- function: + name: GetCCursor + return: CCrsrHandle + args: + - type: INTEGER + trap: 0xAA1B + executor: C_ + +# #### + +- function: + name: SetCCursor + args: + - type: CCrsrHandle + trap: 0xAA1C + executor: C_ + +# #### + +- function: + name: DisposeCCursor + args: + - type: CCrsrHandle + trap: 0xAA26 + executor: C_ + +# #### + +- function: + name: AllocCursor + trap: 0xAA1D + executor: C_ + +# #### + +- function: + name: RestoreDeviceClut + args: + - type: GDHandle + dispatcher: PaletteDispatch + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: ResizePalette + args: + - type: PaletteHandle + - type: INTEGER + dispatcher: PaletteDispatch + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: PMgrVersion + return: INTEGER + dispatcher: PaletteDispatch + selector: 0x0015 + executor: C_ + +# #### + +- function: + name: SaveFore + args: + - type: ColorSpec* + dispatcher: PaletteDispatch + selector: 0x040D + executor: C_ + +# #### + +- function: + name: RestoreFore + args: + - type: ColorSpec* + dispatcher: PaletteDispatch + selector: 0x040F + executor: C_ + +# #### + +- function: + name: SaveBack + args: + - type: ColorSpec* + dispatcher: PaletteDispatch + selector: 0x040E + executor: C_ + +# #### + +- function: + name: RestoreBack + args: + - type: ColorSpec* + dispatcher: PaletteDispatch + selector: 0x0410 + executor: C_ + +# #### + +- function: + name: SetPaletteUpdates + args: + - type: PaletteHandle + - type: INTEGER + dispatcher: PaletteDispatch + selector: 0x0616 + executor: C_ + +# #### + +- function: + name: GetPaletteUpdates + return: INTEGER + args: + - type: PaletteHandle + dispatcher: PaletteDispatch + selector: 0x0417 + executor: C_ + +# #### + +- function: + name: CopyPalette + args: + - name: src_palette + type: PaletteHandle + - name: dst_palette + type: PaletteHandle + - name: src_start + type: int16_t + - name: dst_start + type: int16_t + - name: n_entries + type: int16_t + trap: 0xAAA1 + executor: C_ + +# #### + +- function: + name: GetCWMgrPort + args: + - type: CGrafPtr* + trap: 0xAA48 + executor: C_ + +# #### + +- function: + name: NewGWorld + return: QDErr + args: + - type: GWorldPtr* + - type: INTEGER + - type: const Rect* + - type: CTabHandle + - type: GDHandle + - type: GWorldFlags + comment: | + QDExtensions trap + dispatcher: QDExtensions + selector: 0x00160000 + executor: C_ + +# #### + +- function: + name: LockPixels + return: Boolean + args: + - type: PixMapHandle + dispatcher: QDExtensions + selector: 0x00040001 + executor: C_ + +# #### + +- function: + name: UnlockPixels + args: + - type: PixMapHandle + dispatcher: QDExtensions + selector: 0x00040002 + executor: C_ + +# #### + +- function: + name: UpdateGWorld + return: GWorldFlags + args: + - type: GWorldPtr* + - type: INTEGER + - type: const Rect* + - type: CTabHandle + - type: GDHandle + - type: GWorldFlags + dispatcher: QDExtensions + selector: 0x00160003 + executor: C_ + +# #### + +- function: + name: DisposeGWorld + args: + - type: GWorldPtr + dispatcher: QDExtensions + selector: 0x00040004 + executor: C_ + +# #### + +- function: + name: GetGWorld + args: + - type: CGrafPtr* + - type: GDHandle* + dispatcher: QDExtensions + selector: 0x00080005 + executor: C_ + +# #### + +- function: + name: SetGWorld + args: + - type: CGrafPtr + - type: GDHandle + dispatcher: QDExtensions + selector: 0x00080006 + executor: C_ + +# #### + +- function: + name: AllowPurgePixels + args: + - type: PixMapHandle + dispatcher: QDExtensions + selector: 0x0004000B + executor: C_ + +# #### + +- function: + name: NoPurgePixels + args: + - type: PixMapHandle + dispatcher: QDExtensions + selector: 0x0004000C + executor: C_ + +# #### + +- function: + name: GetPixelsState + return: GWorldFlags + args: + - type: PixMapHandle + dispatcher: QDExtensions + selector: 0x0004000D + executor: C_ + +# #### + +- function: + name: SetPixelsState + args: + - type: PixMapHandle + - type: GWorldFlags + dispatcher: QDExtensions + selector: 0x0008000E + executor: C_ + +# #### + +- function: + name: GetPixBaseAddr + return: Ptr + args: + - type: PixMapHandle + dispatcher: QDExtensions + selector: 0x0004000F + executor: C_ + +# #### + +- function: + name: NewScreenBuffer + return: QDErr + args: + - type: const Rect* + - type: Boolean + - type: GDHandle* + - type: PixMapHandle* + dispatcher: QDExtensions + selector: 0x000E0010 + executor: C_ + +# #### + +- function: + name: DisposeScreenBuffer + args: + - type: PixMapHandle + dispatcher: QDExtensions + selector: 0x00040011 + executor: C_ + +# #### + +- function: + name: GetGWorldDevice + return: GDHandle + args: + - type: GWorldPtr + dispatcher: QDExtensions + selector: 0x00040012 + executor: C_ + +# #### + +- function: + name: PixMap32Bit + return: Boolean + args: + - type: PixMapHandle + dispatcher: QDExtensions + selector: 0x00040016 + executor: C_ + +# #### + +- function: + name: GetGWorldPixMap + return: PixMapHandle + args: + - type: GWorldPtr + dispatcher: QDExtensions + selector: 0x00040017 + executor: C_ + +# #### + +- function: + name: NewTempScreenBuffer + return: QDErr + args: + - type: const Rect* + - type: Boolean + - type: GDHandle* + - type: PixMapHandle* + dispatcher: QDExtensions + selector: 0x000E0015 + executor: C_ + +# #### + +- function: + name: GDeviceChanged + args: + - type: GDHandle + dispatcher: QDExtensions + selector: 0x0004000A + executor: C_ + +# #### + +- function: + name: PortChanged + args: + - type: GrafPtr + dispatcher: QDExtensions + selector: 0x00040009 + executor: C_ + +# #### + +- function: + name: PixPatChanged + args: + - type: PixPatHandle + dispatcher: QDExtensions + selector: 0x00040008 + executor: C_ + +# #### + +- function: + name: CTabChanged + args: + - type: CTabHandle + dispatcher: QDExtensions + selector: 0x00040007 + executor: C_ + +# #### + +- function: + name: QDDone + return: Boolean + args: + - type: GrafPtr + dispatcher: QDExtensions + selector: 0x00040013 + executor: C_ + +# #### + +- function: + name: OffscreenVersion + return: LONGINT + dispatcher: QDExtensions + selector: 0x0014 + executor: C_ + +# #### + +- function: + name: BitMapToRegion + return: OSErr + args: + - type: RgnHandle + - type: const BitMap* + trap: 0xA8D7 + executor: C_ + +# #### + +- function: + name: Entry2Index + return: LONGINT + args: + - type: INTEGER + dispatcher: PaletteDispatch + selector: 0x0000 + executor: C_ + +# #### + +- function: + name: SaveEntries + args: + - type: CTabHandle + - type: CTabHandle + - type: ReqListRec* + trap: 0xAA49 + executor: C_ + +# #### + +- function: + name: RestoreEntries + args: + - type: CTabHandle + - type: CTabHandle + - type: ReqListRec* + trap: 0xAA4A + executor: C_ + +# #### + +- function: + name: DisposePictInfo + return: OSErr + args: + - type: PictInfoID + dispatcher: Pack15 + selector: 0x0206 + executor: C_ + +# #### + +- function: + name: RecordPictInfo + return: OSErr + args: + - type: PictInfoID + - type: PicHandle + dispatcher: Pack15 + selector: 0x0403 + executor: C_ + +# #### + +- function: + name: RecordPixMapInfo + return: OSErr + args: + - type: PictInfoID + - type: PixMapHandle + dispatcher: Pack15 + selector: 0x0404 + executor: C_ + +# #### + +- function: + name: RetrievePictInfo + return: OSErr + args: + - type: PictInfoID + - type: PictInfo* + - type: int16_t + dispatcher: Pack15 + selector: 0x0505 + executor: C_ + +# #### + +- function: + name: NewPictInfo + return: OSErr + args: + - type: PictInfoID* + - type: int16_t + - type: int16_t + - type: int16_t + - type: int16_t + dispatcher: Pack15 + selector: 0x0602 + executor: C_ + +# #### + +- function: + name: GetPictInfo + return: OSErr + args: + - type: PicHandle + - type: PictInfo* + - type: int16_t + - type: int16_t + - type: int16_t + - type: int16_t + dispatcher: Pack15 + selector: 0x0800 + executor: C_ + +# #### + +- function: + name: GetPixMapInfo + return: OSErr + args: + - type: PixMapHandle + - type: PictInfo* + - type: int16_t + - type: int16_t + - type: int16_t + - type: int16_t + dispatcher: Pack15 + selector: 0x0801 + executor: C_ + +# #### + +- function: + name: OpenCPicture + return: PicHandle + args: + - name: newheaderp + type: OpenCPicParams* + trap: 0xAA20 + executor: C_ diff --git a/defs/CodeFragments.yaml b/defs/CodeFragments.yaml new file mode 100644 index 0000000..3215afd --- /dev/null +++ b/defs/CodeFragments.yaml @@ -0,0 +1,387 @@ +- executor_only: + code: | + const std::nullptr_t kUnresolvedCFragSymbolAddress = nullptr; + +# #### + +- struct: + name: cfrg_resource_t + members: + - name: reserved0 + type: uint32_t + - name: reserved1 + type: uint32_t + - name: version + type: uint32_t + - name: reserved2 + type: uint32_t + - name: reserved3 + type: uint32_t + - name: reserved4 + type: uint32_t + - name: reserved5 + type: uint32_t + - name: n_descripts + type: int32_t + size: 32 + +# #### + +- executor_only: + code: | + #define CFRG_VERSION(cfrg) ((cfgr)->version) + #define CFRG_N_DESCRIPTS(cfrg) ((cfrg)->n_descripts) + +# #### + +- struct: + name: cfir_t + members: + - name: isa + type: OSType + - name: update_level + type: uint32_t + - name: current_version + type: uint32_t + - name: oldest_definition_version + type: uint32_t + - name: stack_size + type: uint32_t + - name: appl_library_dir + type: int16_t + - name: fragment_type + type: uint8_t + - name: fragment_location + type: uint8_t + - name: offset_to_fragment + type: int32_t + - name: fragment_length + type: int32_t + - name: reserved0 + type: uint32_t + - name: reserved1 + type: uint32_t + - name: cfir_length + type: uint16_t + - name: name + type: uint8_t[1] + size: 44 + +# #### + +- executor_only: + code: | + #define CFIR_ISA(cfir) ((cfir)->isa) + #define CFIR_TYPE(cfir) ((cfir)->fragment_type) + #define CFIR_LOCATION(cfir) ((cfir)->fragment_location) + #define CFIR_LENGTH(cfir) ((cfir)->cfir_length) + #define CFIR_OFFSET_TO_FRAGMENT(cfir) ((cfir)->offset_to_fragment) + #define CFIR_FRAGMENT_LENGTH(cfir) ((cfir)->fragment_length) + #define CFIR_NAME(cfir) ((cfir)->name) + +# #### + +- enum: + values: + - name: kImportLibraryCFrag + - name: kApplicationCFrag + - name: kDropInAdditionCFrag + - name: kStubLibraryCFrag + - name: kWeakStubLibraryCFrag + +# #### + +- enum: + values: + - name: kWholeFork + value: 0 + +# #### + +- enum: + values: + - name: kInMem + - name: kOnDiskFlat + - name: kOnDiskSegmented + +# #### + +- enum: + values: + - name: kPowerPCArch + value: "'pwpc'" + - name: kMotorola68KArch + value: "'m68k'" + +# #### + +- enum: + values: + - name: kLoadLib + value: 1 + comment: | + deprecated + - name: kReferenceCFrag + value: 1 + - name: kFindLib + value: 2 + - name: kLoadNewCopy + value: 5 + +# #### + +- typedef: + name: LoadFlags + type: uint32_t + +# #### + +- struct: + name: MemFragment + members: + - name: address + type: Ptr + - name: length + type: uint32_t + - name: inPlace + type: Boolean + - name: reservedA + type: uint8_t + - name: reservedB + type: uint16_t + size: 12 + +# #### + +- struct: + name: DiskFragment + members: + - name: fileSpec + type: FSSpecPtr + - name: offset + type: uint32_t + - name: length + type: uint32_t + size: 12 + +# #### + +- struct: + name: SegmentedFragment + members: + - name: fileSpec + type: FSSpecPtr + - name: rsrcType + type: OSType + - name: rsrcID + type: INTEGER + - name: reservedA + type: uint16_t + size: 12 + +# #### + +- struct: + name: FragmentLocator + members: + - name: where + type: uint32_t + - name: u + union: + - name: inMem + type: MemFragment + - name: onDisk + type: DiskFragment + - name: inSegs + type: SegmentedFragment + size: 16 + +# #### + +- struct: + name: InitBlock + members: + - name: contextID + type: uint32_t + - name: closureID + type: uint32_t + - name: connectionID + type: uint32_t + - name: fragLocator + type: FragmentLocator + - name: libName + type: StringPtr + - name: reserved4 + type: uint32_t + size: 36 + +# #### + +- struct: + name: CFragConnection + +# #### + +- typedef: + name: ConnectionID + type: CFragConnection* + +# #### + +- struct: + name: CFragClosure + +# #### + +- typedef: + name: CFragClosureID + type: CFragClosure* + +# #### + +- dispatcher: + name: CodeFragmentDispatch + trap: 0xAA5A + selector-location: StackW + +# #### + +- function: + name: GetDiskFragment + return: OSErr + args: + - name: fsp + type: FSSpecPtr + - name: offset + type: LONGINT + - name: length + type: LONGINT + - name: fragname + type: Str63 + - name: flags + type: LoadFlags + - name: connp + type: ConnectionID* + - name: mainAddrp + type: Ptr* + - name: errname + type: Str255 + dispatcher: CodeFragmentDispatch + selector: 0x0002 + executor: C_ + +# #### + +- typedef: + name: SymClass + type: uint8_t + +# #### + +- function: + name: FindSymbol + return: OSErr + args: + - name: connID + type: ConnectionID + - name: symName + type: Str255 + - name: symAddr + type: Ptr* + - name: symClass + type: SymClass* + dispatcher: CodeFragmentDispatch + selector: 0x0005 + executor: C_ + +# #### + +- function: + name: CloseConnection + return: OSErr + args: + - name: cidp + type: ConnectionID* + dispatcher: CodeFragmentDispatch + selector: 0x0004 + executor: C_ + +# #### + +- function: + name: GetSharedLibrary + return: OSErr + args: + - name: library + type: Str63 + - name: arch + type: OSType + - name: loadflags + type: LoadFlags + - name: cidp + type: ConnectionID* + - name: mainaddrp + type: Ptr* + - name: errName + type: Str255 + dispatcher: CodeFragmentDispatch + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: GetMemFragment + return: OSErr + args: + - name: addr + type: void* + - name: length + type: uint32_t + - name: fragname + type: Str63 + - name: flags + type: LoadFlags + - name: connp + type: ConnectionID* + - name: mainAddrp + type: Ptr* + - name: errname + type: Str255 + dispatcher: CodeFragmentDispatch + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: CountSymbols + return: OSErr + args: + - name: id + type: ConnectionID + - name: countp + type: LONGINT* + dispatcher: CodeFragmentDispatch + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: GetIndSymbol + return: OSErr + args: + - name: id + type: ConnectionID + - name: index + type: LONGINT + - name: name + type: Str255 + - name: addrp + type: Ptr* + - name: classp + type: SymClass* + dispatcher: CodeFragmentDispatch + selector: 0x0007 + executor: C_ diff --git a/defs/CommTool.yaml b/defs/CommTool.yaml new file mode 100644 index 0000000..efd9423 --- /dev/null +++ b/defs/CommTool.yaml @@ -0,0 +1,150 @@ +- struct: + name: CRMRec + members: + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: crmVersion + type: INTEGER + - name: crmPrivate + type: LONGINT + - name: crmReserved + type: INTEGER + - name: crmDeviceType + type: LONGINT + - name: crmDeviceID + type: LONGINT + - name: crmAttributes + type: LONGINT + - name: crmStatus + type: LONGINT + - name: crmRefCon + type: LONGINT + size: 34 + +# #### + +- typedef: + name: CRMRecPtr + type: CRMRec* + +# #### + +- typedef: + name: CRMErr + type: OSErr + +# #### + +- enum: + values: + - name: crmGenericError + value: -1 + - name: crmNoErr + value: 0 + +# #### + +- enum: + values: + - name: curCRMVersion + value: 1 + +# #### + +- enum: + values: + - name: crmType + value: 9 + +# #### + +- enum: + values: + - name: crmRecVersion + value: 1 + +# #### + +- enum: + values: + - name: curCRMSerRecVer + value: 0 + +# #### + +- enum: + values: + - name: crmSerialDevice + value: 1 + +# #### + +- struct: + name: CRMSerialRecord + members: + - name: version + type: INTEGER + - name: inputDriverName + type: StringHandle + - name: outputDriverName + type: StringHandle + - name: name + type: StringHandle + - name: deviceIcon + type: Handle + - name: ratedSpeed + type: LONGINT + - name: maxSpeed + type: LONGINT + - name: reserved + type: LONGINT + size: 30 + +# #### + +- typedef: + name: CRMSerialPtr + type: CRMSerialRecord* + +# #### + +- function: + name: CRMGetCRMVersion + return: INTEGER + +# #### + +- function: + name: CRMGetHeader + return: QHdrPtr + +# #### + +- function: + name: CRMInstall + args: + - type: QElemPtr + +# #### + +- function: + name: CRMRemove + return: OSErr + args: + - type: QElemPtr + +# #### + +- function: + name: CRMSearch + return: QElemPtr + args: + - type: QElemPtr + +# #### + +- function: + name: InitCRM + return: CRMErr diff --git a/defs/Components.yaml b/defs/Components.yaml new file mode 100644 index 0000000..364b0aa --- /dev/null +++ b/defs/Components.yaml @@ -0,0 +1,27 @@ +- struct: + name: ComponentRecord + members: + - name: data + type: LONGINT[1] + size: 4 + +# #### + +- typedef: + name: Component + type: ComponentRecord* + +# #### + +- struct: + name: ComponentInstanceRecord + members: + - name: data + type: LONGINT[1] + size: 4 + +# #### + +- typedef: + name: ComponentInstance + type: ComponentInstanceRecord* diff --git a/defs/ControlMgr.yaml b/defs/ControlMgr.yaml new file mode 100644 index 0000000..e802fdc --- /dev/null +++ b/defs/ControlMgr.yaml @@ -0,0 +1,653 @@ +- enum: + values: + - name: pushButProc + value: 0 + - name: checkBoxProc + value: 1 + - name: radioButProc + value: 2 + - name: useWFont + value: 8 + - name: scrollBarProc + value: 16 + +# #### + +- enum: + values: + - name: inButton + value: 10 + - name: inCheckBox + value: 11 + - name: inUpButton + value: 20 + - name: inDownButton + value: 21 + - name: inPageUp + value: 22 + - name: inPageDown + value: 23 + - name: inThumb + value: 129 + +# #### + +- enum: + values: + - name: popupFixedWidth + value: 1 << 0 + - name: popupUseAddResMenu + value: 1 << 2 + - name: popupUseWFont + value: 1 << 3 + +# #### + +- enum: + values: + - name: popupTitleBold + value: 1 << 8 + - name: popupTitleItalic + value: 1 << 9 + - name: popupTitleUnderline + value: 1 << 10 + - name: popupTitleOutline + value: 1 << 11 + - name: popupTitleShadow + value: 1 << 12 + - name: popupTitleCondense + value: 1 << 13 + - name: popupTitleExtend + value: 1 << 14 + - name: popupTitleNoStyle + value: 1 << 15 + +# #### + +- enum: + values: + - name: popupTitleLeftJust + value: 0x00 + - name: popupTitleCenterJust + value: 0x01 + - name: popupTitleRightJust + value: 0xFF + +# #### + +- enum: + values: + - name: drawCntl + value: 0 + - name: testCntl + value: 1 + - name: calcCRgns + value: 2 + - name: initCntl + value: 3 + - name: dispCntl + value: 4 + - name: posCntl + value: 5 + - name: thumbCntl + value: 6 + - name: dragCntl + value: 7 + - name: autoTrack + value: 8 + +# #### + +- enum: + values: + - name: calcCntlRgn + value: 10 + - name: calcThumbRgn + value: 11 + +# #### + +- enum: + values: + - name: cFrameColor + value: 0 + - name: cBodyColor + value: 1 + - name: cTextColor + value: 2 + - name: cThumbColor + value: 3 + comment: | + control color table parts + +# #### + +- enum: + values: + - name: cArrowsColorLight + value: 5 + - name: cArrowsColorDark + value: 6 + - name: cThumbLight + value: 7 + - name: cThumbDark + value: 8 + - name: cHiliteLight + value: 9 + - name: cHiliteDark + value: 10 + - name: cTitleBarLight + value: 11 + - name: cTitleBarDark + value: 12 + - name: cTingeLight + value: 13 + - name: cTingeDark + value: 14 + +# #### + +- funptr: + args: + - type: ControlHandle + - type: int16_t + name: ControlActionUPP + +# #### + +- struct: + name: ControlRecord + members: + - name: nextControl + type: ControlHandle + - name: contrlOwner + type: WindowPtr + - name: contrlRect + type: Rect + - name: contrlVis + type: Byte + - name: contrlHilite + type: Byte + - name: contrlValue + type: INTEGER + - name: contrlMin + type: INTEGER + - name: contrlMax + type: INTEGER + - name: contrlDefProc + type: Handle + - name: contrlData + type: Handle + - name: contrlAction + type: ControlActionUPP + - name: contrlRfCon + type: LONGINT + - name: contrlTitle + type: Str255 + size: 296 + +# #### + +- struct: + name: CtlCTab + members: + - name: ccSeed + type: LONGINT + - name: ccReserved + type: INTEGER + - name: ctSize + type: INTEGER + - name: ctTable + type: cSpecArray + size: 16 + +# #### + +- typedef: + name: CCTabPtr + type: CtlCTab* + +# #### + +- typedef: + name: CCTabHandle + type: CCTabPtr* + +# #### + +- struct: + name: AuxCtlRec + +# #### + +- typedef: + name: AuxCtlPtr + type: AuxCtlRec* + +# #### + +- typedef: + name: AuxCtlHandle + type: AuxCtlPtr* + +# #### + +- struct: + name: AuxCtlRec + members: + - name: acNext + type: AuxCtlHandle + - name: acOwner + type: ControlHandle + - name: acCTable + type: CCTabHandle + - name: acFlags + type: INTEGER + - name: acReserved + type: LONGINT + - name: acRefCon + type: LONGINT + size: 22 + +# #### + +- lowmem: + name: AuxCtlHead + type: AuxCtlHandle + address: 0xCD4 + comment: | + ControlMgr IMV-216 (true); + +# #### + +- function: + name: SetControlTitle + args: + - name: c + type: ControlHandle + - name: t + type: ConstStringPtr + trap: 0xA95F + executor: C_ + +# #### + +- function: + name: GetControlTitle + args: + - name: c + type: ControlHandle + - name: t + type: StringPtr + trap: 0xA95E + executor: C_ + +# #### + +- function: + name: HideControl + args: + - name: c + type: ControlHandle + trap: 0xA958 + executor: C_ + +# #### + +- function: + name: ShowControl + args: + - name: c + type: ControlHandle + trap: 0xA957 + executor: C_ + +# #### + +- function: + name: HiliteControl + args: + - name: c + type: ControlHandle + - name: state + type: INTEGER + trap: 0xA95D + executor: C_ + +# #### + +- function: + name: DrawControls + args: + - name: w + type: WindowPtr + trap: 0xA969 + executor: C_ + +# #### + +- function: + name: Draw1Control + args: + - name: c + type: ControlHandle + trap: 0xA96D + executor: C_ + +# #### + +- function: + name: UpdateControls + args: + - name: wp + type: WindowPtr + - name: rh + type: RgnHandle + trap: 0xA953 + executor: C_ + +# #### + +- function: + name: NewControl + return: ControlHandle + args: + - name: wst + type: WindowPtr + - name: r + type: const Rect* + - name: title + type: ConstStringPtr + - name: vis + type: Boolean + - name: value + type: INTEGER + - name: min + type: INTEGER + - name: max + type: INTEGER + - name: procid + type: INTEGER + - name: rc + type: LONGINT + trap: 0xA954 + executor: C_ + +# #### + +- function: + name: GetNewControl + return: ControlHandle + args: + - name: cid + type: INTEGER + - name: wst + type: WindowPtr + trap: 0xA9BE + executor: C_ + +# #### + +- function: + name: DisposeControl + args: + - name: c + type: ControlHandle + trap: 0xA955 + executor: C_ + +# #### + +- function: + name: KillControls + args: + - name: w + type: WindowPtr + trap: 0xA956 + executor: C_ + +# #### + +- function: + name: SetControlReference + args: + - name: c + type: ControlHandle + - name: data + type: LONGINT + trap: 0xA95B + executor: C_ + +# #### + +- function: + name: GetControlReference + return: LONGINT + args: + - name: c + type: ControlHandle + trap: 0xA95A + executor: C_ + +# #### + +- function: + name: SetControlAction + args: + - name: c + type: ControlHandle + - name: a + type: ControlActionUPP + trap: 0xA96B + executor: C_ + +# #### + +- function: + name: GetControlAction + return: ControlActionUPP + args: + - name: c + type: ControlHandle + trap: 0xA96A + executor: C_ + +# #### + +- function: + name: GetControlVariant + return: INTEGER + args: + - name: c + type: ControlHandle + trap: 0xA809 + executor: C_ + +# #### + +- function: + name: GetAuxiliaryControlRecord + return: Boolean + args: + - name: c + type: ControlHandle + - name: acHndl + type: AuxCtlHandle* + trap: 0xAA44 + executor: C_ + +# #### + +- function: + name: FindControl + return: INTEGER + args: + - name: p + type: Point + - name: w + type: WindowPtr + - name: cp + type: ControlHandle* + trap: 0xA96C + executor: C_ + +# #### + +- function: + name: TrackControl + return: INTEGER + args: + - name: c + type: ControlHandle + - name: p + type: Point + - name: a + type: ControlActionUPP + trap: 0xA968 + executor: C_ + +# #### + +- function: + name: TestControl + return: INTEGER + args: + - name: c + type: ControlHandle + - name: p + type: Point + trap: 0xA966 + executor: C_ + +# #### + +- function: + name: SetControlValue + args: + - name: c + type: ControlHandle + - name: v + type: INTEGER + trap: 0xA963 + executor: C_ + +# #### + +- function: + name: GetControlValue + return: INTEGER + args: + - name: c + type: ControlHandle + trap: 0xA960 + executor: C_ + +# #### + +- function: + name: SetControlMinimum + args: + - name: c + type: ControlHandle + - name: v + type: INTEGER + trap: 0xA964 + executor: C_ + +# #### + +- function: + name: GetControlMinimum + return: INTEGER + args: + - name: c + type: ControlHandle + trap: 0xA961 + executor: C_ + +# #### + +- function: + name: SetControlMaximum + args: + - name: c + type: ControlHandle + - name: v + type: INTEGER + trap: 0xA965 + executor: C_ + +# #### + +- function: + name: GetControlMaximum + return: INTEGER + args: + - name: c + type: ControlHandle + trap: 0xA962 + executor: C_ + +# #### + +- function: + name: MoveControl + args: + - name: c + type: ControlHandle + - name: h + type: INTEGER + - name: v + type: INTEGER + trap: 0xA959 + executor: C_ + +# #### + +- function: + name: DragControl + args: + - name: c + type: ControlHandle + - name: p + type: Point + - name: limit + type: const Rect* + - name: slop + type: const Rect* + - name: axis + type: INTEGER + trap: 0xA967 + executor: C_ + +# #### + +- function: + name: SizeControl + args: + - name: c + type: ControlHandle + - name: width + type: INTEGER + - name: height + type: INTEGER + trap: 0xA95C + executor: C_ + +# #### + +- function: + name: SetControlColor + args: + - name: ctl + type: ControlHandle + - name: ctab + type: CCTabHandle + trap: 0xAA43 + executor: C_ + +# #### + +- typedef: + name: ControlRef + type: ControlPtr diff --git a/defs/DeskMgr.yaml b/defs/DeskMgr.yaml new file mode 100644 index 0000000..f5a5f8d --- /dev/null +++ b/defs/DeskMgr.yaml @@ -0,0 +1,106 @@ +- enum: + values: + - name: undoCmd + value: 0 + - name: cutCmd + value: 2 + - name: copyCmd + value: 3 + - name: pasteCmd + value: 4 + - name: clearCmd + value: 5 + +# #### + +- enum: + values: + - name: accEvent + value: 64 + - name: accRun + value: 65 + - name: accMenu + value: 67 + - name: accUndo + value: 68 + +# #### + +- lowmem: + name: SEvtEnb + type: Byte + address: 0x15C + comment: | + DeskMgr IMI-443 (false); + +# #### + +- function: + name: OpenDeskAcc + return: INTEGER + args: + - name: acc + type: ConstStringPtr + trap: 0xA9B6 + executor: C_ + +# #### + +- function: + name: CloseDeskAcc + args: + - name: rn + type: INTEGER + trap: 0xA9B7 + executor: C_ + +# #### + +- function: + name: SystemClick + args: + - name: evp + type: EventRecord* + - name: wp + type: WindowPtr + trap: 0xA9B3 + executor: C_ + +# #### + +- function: + name: SystemEdit + return: Boolean + args: + - name: editcmd + type: INTEGER + trap: 0xA9C2 + executor: C_ + +# #### + +- function: + name: SystemTask + trap: 0xA9B4 + executor: C_ + +# #### + +- function: + name: SystemEvent + return: Boolean + args: + - name: evp + type: EventRecord* + trap: 0xA9B2 + executor: C_ + +# #### + +- function: + name: SystemMenu + args: + - name: menu + type: LONGINT + trap: 0xA9B5 + executor: C_ diff --git a/defs/DeviceMgr.yaml b/defs/DeviceMgr.yaml new file mode 100644 index 0000000..4028965 --- /dev/null +++ b/defs/DeviceMgr.yaml @@ -0,0 +1,445 @@ +- struct: + name: DCtlEntry + +# #### + +- typedef: + name: DCtlPtr + type: DCtlEntry* + +# #### + +- typedef: + name: DCtlHandle + type: DCtlPtr* + +# #### + +- typedef: + name: DCtlHandlePtr + type: DCtlHandle* + +# #### + +- funptr: + return: OSErr + args: + - type: ParmBlkPtr + register: A0 + - type: DCtlPtr + register: A1 + returnreg: D0 + name: DriverUPP + +# #### + +- struct: + members: + - name: udrvrOpen + type: DriverUPP + - name: udrvrPrime + type: DriverUPP + comment: | + read and write + - name: udrvrCtl + type: DriverUPP + comment: | + control and killio + - name: udrvrStatus + type: DriverUPP + - name: udrvrClose + type: DriverUPP + - name: udrvrName + type: Str255 + name: umacdriver + +# #### + +- typedef: + name: umacdriverptr + type: umacdriver* + +# #### + +- struct: + name: ramdriver + members: + - name: drvrFlags + type: INTEGER + - name: drvrDelay + type: INTEGER + - name: drvrEMask + type: INTEGER + - name: drvrMenu + type: INTEGER + - name: drvrOpen + type: INTEGER + - name: drvrPrime + type: INTEGER + - name: drvrCtl + type: INTEGER + - name: drvrStatus + type: INTEGER + - name: drvrClose + type: INTEGER + - name: drvrName + type: char + size: 20 + +# #### + +- typedef: + name: ramdriverptr + type: ramdriver* + +# #### + +- typedef: + name: ramdriverhand + type: ramdriverptr* + +# #### + +- enum: + values: + - name: Open + - name: Prime + - name: Ctl + - name: Stat + - name: Close + name: DriverRoutineType + +# #### + +- struct: + name: DCtlEntry + members: + - name: dCtlDriver + type: umacdriverptr + comment: | + not just Ptr + - name: dCtlFlags + type: INTEGER + - name: dCtlQHdr + type: QHdr + - name: dCtlPosition + type: LONGINT + - name: dCtlStorage + type: Handle + - name: dCtlRefNum + type: INTEGER + - name: dCtlCurTicks + type: LONGINT + - name: dCtlWindow + type: WindowPtr + - name: dCtlDelay + type: INTEGER + - name: dCtlEMask + type: INTEGER + - name: dCtlMenu + type: INTEGER + size: 40 + +# #### + +- enum: + values: + - name: asyncTrpBit + value: 1 << 10 + - name: noQueueBit + value: 1 << 9 + +# #### + +- enum: + values: + - name: NEEDTIMEBIT + value: 1 << 13 + +# #### + +- enum: + values: + - name: aRdCmd + value: 2 + - name: aWrCmd + value: 3 + +# #### + +- enum: + values: + - name: killCode + value: 1 + +# #### + +- enum: + values: + - name: NDEVICES + value: 48 + +# #### + +- enum: + values: + - name: abortErr + value: -27 + - name: badUnitErr + value: -21 + - name: controlErr + value: -17 + - name: dInstErr + value: -26 + - name: dRemovErr + value: -25 + - name: notOpenErr + value: -28 + - name: openErr + value: -23 + - name: readErr + value: -19 + - name: statusErr + value: -18 + - name: unitEmptyErr + value: -22 + - name: writErr + value: -20 + +# #### + +- lowmem: + name: UTableBase + type: DCtlHandlePtr + address: 0x11C + comment: | + DeviceMgr IMII-192 (false); + +# #### + +- lowmem: + name: Lvl1DT + type: ProcPtr[8] + address: 0x192 + comment: | + DeviceMgr IMII-197 (false); + +# #### + +- lowmem: + name: Lvl2DT + type: ProcPtr[8] + address: 0x1B2 + comment: | + DeviceMgr IMII-198 (false); + +# #### + +- lowmem: + name: UnitNtryCnt + type: INTEGER + address: 0x1D2 + comment: | + DeviceMgr ThinkC (true-b); + +# #### + +- lowmem: + name: VIA + type: Ptr + address: 0x1D4 + comment: | + DeviceMgr IMIII-39 (true-b); + +# #### + +- lowmem: + name: SCCRd + type: Ptr + address: 0x1D8 + comment: | + DeviceMgr IMII-199 (false); + +# #### + +- lowmem: + name: SCCWr + type: Ptr + address: 0x1DC + comment: | + DeviceMgr IMII-199 (false); + +# #### + +- lowmem: + name: IWM + type: Ptr + address: 0x1E0 + comment: | + DeviceMgr ThinkC (false); + +# #### + +- lowmem: + name: ExtStsDT + type: ProcPtr[4] + address: 0x2BE + comment: | + DeviceMgr IMII-199 (false); + +# #### + +- lowmem: + name: JFetch + type: Ptr + address: 0x8F4 + comment: | + DeviceMgr IMII-194 (false); + +# #### + +- lowmem: + name: JStash + type: Ptr + address: 0x8F8 + comment: | + DeviceMgr IMII-195 (false); + +# #### + +- lowmem: + name: JIODone + type: Ptr + address: 0x8FC + comment: | + DeviceMgr IMII-195 (false); + +# #### + +- function: + name: PBControl + return: OSErr + args: + - name: pbp + type: ParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA004 + returnreg: D0 + variants: + - PBControlSync + - PBControlAsync + +# #### + +- function: + name: PBStatus + return: OSErr + args: + - name: pbp + type: ParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA005 + returnreg: D0 + variants: + - PBStatusSync + - PBStatusAsync + +# #### + +- function: + name: PBKillIO + return: OSErr + args: + - name: pbp + type: ParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA006 + returnreg: D0 + variants: + - PBKillIOSync + - PBKillIOAsync + +# #### + +- function: + name: OpenDriver + return: OSErr + args: + - name: name + type: ConstStringPtr + - name: rnp + type: INTEGER* + executor: true + +# #### + +- function: + name: CloseDriver + return: OSErr + args: + - name: rn + type: INTEGER + executor: true + +# #### + +- function: + name: Control + return: OSErr + args: + - name: rn + type: INTEGER + - name: code + type: INTEGER + - name: param + type: const void* + executor: true + +# #### + +- function: + name: Status + return: OSErr + args: + - name: rn + type: INTEGER + - name: code + type: INTEGER + - name: param + type: Ptr + executor: true + +# #### + +- function: + name: KillIO + return: OSErr + args: + - name: rn + type: INTEGER + executor: true + +# #### + +- function: + name: GetDCtlEntry + return: DCtlHandle + args: + - name: rn + type: INTEGER + executor: true diff --git a/defs/DialogMgr.yaml b/defs/DialogMgr.yaml new file mode 100644 index 0000000..02f43d8 --- /dev/null +++ b/defs/DialogMgr.yaml @@ -0,0 +1,848 @@ +- enum: + values: + - name: ctrlItem + value: 4 + - name: btnCtrl + value: 0 + - name: chkCtrl + value: 1 + - name: radCtrl + value: 2 + - name: resCtrl + value: 3 + - name: statText + value: 8 + - name: editText + value: 16 + - name: iconItem + value: 32 + - name: picItem + value: 64 + - name: userItem + value: 0 + - name: itemDisable + value: 128 + +# #### + +- enum: + values: + - name: OK + value: 1 + - name: Cancel + value: 2 + +# #### + +- enum: + values: + - name: stopIcon + value: 0 + - name: noteIcon + value: 1 + - name: cautionIcon + value: 2 + +# #### + +- struct: + name: DialogRecord + members: + - name: window + type: WindowRecord + - name: items + type: Handle + - name: textH + type: TEHandle + - name: editField + type: INTEGER + - name: editOpen + type: INTEGER + - name: aDefItem + type: INTEGER + size: 170 + +# #### + +- typedef: + name: DialogPeek + type: DialogRecord* + +# #### + +- typedef: + name: CDialogPtr + type: CWindowPtr + +# #### + +- typedef: + name: DialogPtr + type: WindowPtr + +# #### + +- executor_only: + code: | + /* dialog record accessors */ + #define DIALOG_WINDOW(dialog) ((WindowPtr) & ((DialogPeek)dialog)->window) + #define DIALOG_ITEMS(dialog) (((DialogPeek)(dialog))->items) + #define DIALOG_TEXTH(dialog) (((DialogPeek)(dialog))->textH) + #define DIALOG_EDIT_FIELD(dialog) (((DialogPeek)(dialog))->editField) + #define DIALOG_EDIT_OPEN(dialog) (((DialogPeek)(dialog))->editOpen) + #define DIALOG_ADEF_ITEM(dialog) (((DialogPeek)(dialog))->aDefItem) + +# #### + +- struct: + name: DialogTemplate + members: + - name: boundsRect + type: Rect + - name: procID + type: INTEGER + - name: visible + type: Boolean + - name: filler1 + type: Boolean + - name: goAwayFlag + type: Boolean + - name: filler2 + type: Boolean + - name: refCon + type: LONGINT + - name: itemsID + type: INTEGER + - name: title + type: Str255 + size: 276 + +# #### + +- typedef: + name: DialogTPtr + type: DialogTemplate* + +# #### + +- typedef: + name: DialogTHndl + type: DialogTPtr* + +# #### + +- typedef: + name: StageList + type: int16_t + size: 2 + +# #### + +- struct: + name: AlertTemplate + members: + - name: boundsRect + type: Rect + - name: itemsID + type: INTEGER + - name: stages + type: StageList + size: 12 + +# #### + +- typedef: + name: AlertTPtr + type: AlertTemplate* + +# #### + +- typedef: + name: AlertTHndl + type: AlertTPtr* + +# #### + +- enum: + values: + - name: overlayDITL + value: 0 + - name: appendDITLRight + value: 1 + - name: appendDITLBottom + value: 2 + +# #### + +- typedef: + name: DITLMethod + type: int16_t + +# #### + +- enum: + values: + - name: TEdoFont + value: 1 + - name: TEdoFace + value: 2 + - name: TEdoSize + value: 4 + - name: TEdoColor + value: 8 + - name: TEdoAll + value: 15 + +# #### + +- enum: + values: + - name: TEaddSize + value: 16 + +# #### + +- enum: + values: + - name: doBColor + value: 8192 + - name: doMode + value: 16384 + - name: doFontName + value: 32768 + +# #### + +- funptr: + args: + - name: soundNumber + type: INTEGER + name: SoundUPP + +# #### + +- funptr: + return: Boolean + args: + - name: theDialog + type: DialogPtr + - name: theEvent + type: EventRecord* + - name: itemHit + type: INTEGER* + name: ModalFilterUPP + +# #### + +- funptr: + return: Boolean + args: + - name: theDialog + type: DialogPtr + - name: theEvent + type: EventRecord* + - name: itemHit + type: INTEGER* + - name: yourDataPtr + type: void* + name: ModalFilterYDUPP + +# #### + +- funptr: + args: + - name: theDialog + type: DialogPtr + - name: itemNo + type: INTEGER + name: UserItemUPP + +# #### + +- lowmem: + name: ResumeProc + type: ProcPtr + address: 0xA8C + comment: | + DialogMgr IMI-411 (true); + +# #### + +- lowmem: + name: ANumber + type: INTEGER + address: 0xA98 + comment: | + DialogMgr IMI-423 (true); + +# #### + +- lowmem: + name: ACount + type: INTEGER + address: 0xA9A + comment: | + DialogMgr IMI-423 (true); + +# #### + +- lowmem: + name: DABeeper + type: SoundUPP + address: 0xA9C + comment: | + DialogMgr IMI-411 (true); + +# #### + +- lowmem: + name: DAStrings + type: Handle[4] + address: 0xAA0 + comment: | + DialogMgr IMI-421 (true); + +# #### + +- lowmem: + name: DlgFont + type: INTEGER + address: 0xAFA + comment: | + DialogMgr IMI-412 (true); + +# #### + +- dispatcher: + name: DialogDispatch + trap: 0xAA68 + selector-location: D0W + +# #### + +- function: + name: Alert + return: INTEGER + args: + - name: id + type: INTEGER + - name: fp + type: ModalFilterUPP + trap: 0xA985 + executor: C_ + +# #### + +- function: + name: StopAlert + return: INTEGER + args: + - name: id + type: INTEGER + - name: fp + type: ModalFilterUPP + trap: 0xA986 + executor: C_ + +# #### + +- function: + name: NoteAlert + return: INTEGER + args: + - name: id + type: INTEGER + - name: fp + type: ModalFilterUPP + trap: 0xA987 + executor: C_ + +# #### + +- function: + name: CautionAlert + return: INTEGER + args: + - name: id + type: INTEGER + - name: fp + type: ModalFilterUPP + trap: 0xA988 + executor: C_ + +# #### + +- function: + name: CouldAlert + args: + - name: id + type: INTEGER + trap: 0xA989 + executor: C_ + +# #### + +- function: + name: FreeAlert + args: + - name: id + type: INTEGER + trap: 0xA98A + executor: C_ + +# #### + +- function: + name: CouldDialog + args: + - name: id + type: INTEGER + trap: 0xA979 + executor: C_ + +# #### + +- function: + name: FreeDialog + args: + - name: id + type: INTEGER + trap: 0xA97A + executor: C_ + +# #### + +- function: + name: NewDialog + return: DialogPtr + args: + - name: dst + type: void* + - name: r + type: const Rect* + - name: tit + type: ConstStringPtr + - name: vis + type: Boolean + - name: procid + type: INTEGER + - name: behind + type: WindowPtr + - name: gaflag + type: Boolean + - name: rc + type: LONGINT + - name: items + type: Handle + trap: 0xA97D + executor: C_ + +# #### + +- function: + name: GetNewDialog + return: DialogPtr + args: + - name: id + type: INTEGER + - name: dst + type: void* + - name: behind + type: WindowPtr + trap: 0xA97C + executor: C_ + +# #### + +- function: + name: CloseDialog + args: + - name: dp + type: DialogPtr + trap: 0xA982 + executor: C_ + +# #### + +- function: + name: DisposeDialog + args: + - name: dp + type: DialogPtr + trap: 0xA983 + executor: C_ + +# #### + +- function: + name: ModalDialog + args: + - name: fp + type: ModalFilterUPP + - name: item + type: INTEGER* + trap: 0xA991 + executor: C_ + +# #### + +- function: + name: IsDialogEvent + return: Boolean + args: + - name: evt + type: EventRecord* + trap: 0xA97F + executor: C_ + +# #### + +- function: + name: DrawDialog + args: + - name: dp + type: DialogPtr + trap: 0xA981 + executor: C_ + +# #### + +- function: + name: FindDialogItem + return: INTEGER + args: + - name: dp + type: DialogPtr + - name: pt + type: Point + trap: 0xA984 + executor: C_ + +# #### + +- function: + name: UpdateDialog + args: + - name: dp + type: DialogPtr + - name: rgn + type: RgnHandle + trap: 0xA978 + executor: C_ + +# #### + +- function: + name: DialogSelect + return: Boolean + args: + - name: evt + type: EventRecord* + - name: dpp + type: DialogPtr* + - name: item + type: INTEGER* + trap: 0xA980 + executor: C_ + +# #### + +- function: + name: DialogCut + args: + - name: dp + type: DialogPtr + +# #### + +- function: + name: DialogCopy + args: + - name: dp + type: DialogPtr + +# #### + +- function: + name: DialogPaste + args: + - name: dp + type: DialogPtr + +# #### + +- function: + name: DialogDelete + args: + - name: dp + type: DialogPtr + +# #### + +- function: + name: ErrorSound + args: + - name: sp + type: SoundUPP + trap: 0xA98C + executor: C_ + +# #### + +- function: + name: InitDialogs + args: + - name: rp + type: ProcPtr + trap: 0xA97B + executor: C_ + +# #### + +- function: + name: SetDialogFont + args: + - name: i + type: INTEGER + +# #### + +- function: + name: ParamText + args: + - name: p0 + type: ConstStringPtr + - name: p1 + type: ConstStringPtr + - name: p2 + type: ConstStringPtr + - name: p3 + type: ConstStringPtr + trap: 0xA98B + executor: C_ + +# #### + +- function: + name: GetDialogItem + args: + - name: dp + type: DialogPtr + - name: itemno + type: INTEGER + - name: itype + type: INTEGER* + - name: item + type: Handle* + - name: r + type: Rect* + trap: 0xA98D + executor: C_ + +# #### + +- function: + name: SetDialogItem + args: + - name: dp + type: DialogPtr + - name: itemno + type: INTEGER + - name: itype + type: INTEGER + - name: item + type: Handle + - name: r + type: const Rect* + trap: 0xA98E + executor: C_ + +# #### + +- function: + name: GetDialogItemText + args: + - name: item + type: Handle + - name: text + type: StringPtr + trap: 0xA990 + executor: C_ + +# #### + +- function: + name: SetDialogItemText + args: + - name: item + type: Handle + - name: text + type: ConstStringPtr + trap: 0xA98F + executor: C_ + +# #### + +- function: + name: SelectDialogItemText + args: + - name: dp + type: DialogPtr + - name: itemno + type: INTEGER + - name: start + type: INTEGER + - name: stop + type: INTEGER + trap: 0xA97E + executor: C_ + +# #### + +- function: + name: GetAlertStage + return: INTEGER + +# #### + +- function: + name: ResetAlertStage + +# #### + +- function: + name: HideDialogItem + args: + - name: dp + type: DialogPtr + - name: item + type: INTEGER + trap: 0xA827 + executor: C_ + +# #### + +- function: + name: ShowDialogItem + args: + - name: dp + type: DialogPtr + - name: item + type: INTEGER + trap: 0xA828 + executor: C_ + +# #### + +- function: + name: NewColorDialog + return: DialogPtr + args: + - type: void* + - type: const Rect* + - type: ConstStringPtr + - type: Boolean + - type: INTEGER + - type: WindowPtr + - type: Boolean + - type: LONGINT + - type: Handle + trap: 0xAA4B + executor: C_ + +# #### + +- function: + name: GetStdFilterProc + return: OSErr + args: + - name: proc + type: ProcPtr* + dispatcher: DialogDispatch + selector: 0x0203 + executor: C_ + +# #### + +- function: + name: SetDialogDefaultItem + return: OSErr + args: + - name: dialog + type: DialogPtr + - name: new_item + type: int16_t + dispatcher: DialogDispatch + selector: 0x0304 + executor: C_ + +# #### + +- function: + name: SetDialogCancelItem + return: OSErr + args: + - name: dialog + type: DialogPtr + - name: new_item + type: int16_t + dispatcher: DialogDispatch + selector: 0x0305 + executor: C_ + +# #### + +- function: + name: SetDialogTracksCursor + return: OSErr + args: + - name: dialog + type: DialogPtr + - name: tracks + type: Boolean + dispatcher: DialogDispatch + selector: 0x0306 + executor: C_ + +# #### + +- function: + name: AppendDITL + args: + - type: DialogPtr + - type: Handle + - type: DITLMethod + +# #### + +- function: + name: ShortenDITL + args: + - type: DialogPtr + - type: int16_t + +# #### + +- function: + name: CountDITL + return: int16_t + args: + - type: DialogPtr + +# #### + +- typedef: + name: DialogRef + type: DialogPtr + +# #### + +- typedef: + name: DialogItemIndex + type: int16_t + +# #### + +- typedef: + name: DialogItemType + type: int16_t diff --git a/defs/Disk.yaml b/defs/Disk.yaml new file mode 100644 index 0000000..d9d53d6 --- /dev/null +++ b/defs/Disk.yaml @@ -0,0 +1,104 @@ +- enum: + values: + - name: firstDskErr + value: -84 + - name: sectNFErr + value: -81 + - name: seekErr + value: -80 + - name: spdAdjErr + value: -79 + - name: twoSideErr + value: -78 + - name: initIWMErr + value: -77 + - name: tk0BadErr + value: -76 + - name: cantStepErr + value: -75 + - name: wrUnderrun + value: -74 + - name: badDBtSlp + value: -73 + - name: badDCksum + value: -72 + - name: noDtaMkErr + value: -71 + - name: badBtSlpErr + value: -70 + - name: badCksmErr + value: -69 + - name: dataVerErr + value: -68 + - name: noAdrMkErr + value: -67 + - name: noNybErr + value: -66 + - name: offLinErr + value: -65 + - name: noDriveErr + value: -64 + - name: lastDskErr + value: -64 + +# #### + +- struct: + name: DrvSts + members: + - name: track + type: INTEGER + - name: writeProt + type: SignedByte + - name: diskInPlace + type: SignedByte + - name: installed + type: SignedByte + - name: sides + type: SignedByte + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: dQDrive + type: INTEGER + - name: dQRefNum + type: INTEGER + - name: dQFSID + type: INTEGER + - name: twoSideFmt + type: SignedByte + - name: needsFlush + type: SignedByte + - name: diskErrs + type: INTEGER + size: 22 + +# #### + +- function: + name: DiskEject + return: OSErr + args: + - name: rn + type: INTEGER + +# #### + +- function: + name: SetTagBuffer + return: OSErr + args: + - name: bp + type: Ptr + +# #### + +- function: + name: DriveStatus + return: OSErr + args: + - name: dn + type: INTEGER + - name: statp + type: DrvSts* diff --git a/defs/DiskInit.yaml b/defs/DiskInit.yaml new file mode 100644 index 0000000..093b9a7 --- /dev/null +++ b/defs/DiskInit.yaml @@ -0,0 +1,72 @@ +- dispatcher: + name: Pack2 + trap: 0xA9E9 + selector-location: StackW + +# #### + +- function: + name: DILoad + dispatcher: Pack2 + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: DIUnload + dispatcher: Pack2 + selector: 0x0004 + executor: C_ + +# #### + +- function: + name: DIBadMount + return: INTEGER + args: + - name: pt + type: Point + - name: evtmess + type: LONGINT + dispatcher: Pack2 + selector: 0x0000 + executor: C_ + +# #### + +- function: + name: DIFormat + return: OSErr + args: + - name: dn + type: INTEGER + dispatcher: Pack2 + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: DIVerify + return: OSErr + args: + - name: dn + type: INTEGER + dispatcher: Pack2 + selector: 0x0008 + executor: C_ + +# #### + +- function: + name: DIZero + return: OSErr + args: + - name: dn + type: INTEGER + - name: vname + type: StringPtr + dispatcher: Pack2 + selector: 0x000A + executor: C_ diff --git a/defs/Displays.yaml b/defs/Displays.yaml new file mode 100644 index 0000000..855a122 --- /dev/null +++ b/defs/Displays.yaml @@ -0,0 +1,26 @@ +- funptr: + args: + - name: theEvent + type: AppleEvent* + name: DMNotificationUPP + +# #### + +- dispatcher: + name: DisplayDispatch + trap: 0xABEB + selector-location: D0W + +# #### + +- function: + name: DMRegisterNotifyProc + return: OSErr + args: + - name: proc + type: DMNotificationUPP + - name: psn + type: ProcessSerialNumber* + dispatcher: DisplayDispatch + selector: 0x0414 + executor: C_ diff --git a/defs/EditionMgr.yaml b/defs/EditionMgr.yaml new file mode 100644 index 0000000..a2eda9d --- /dev/null +++ b/defs/EditionMgr.yaml @@ -0,0 +1,830 @@ +- typedef: + name: TimeStamp + type: int32_t + +# #### + +- typedef: + name: EditionRefNum + type: Handle + +# #### + +- typedef: + name: UpdateMode + type: int16_t + +# #### + +- typedef: + name: SectionType + type: SignedByte + +# #### + +- typedef: + name: FormatType + type: char[4] + +# #### + +- typedef: + name: ExpDialogHookUPP + type: ProcPtr + +# #### + +- typedef: + name: ExpModalFilterUPP + type: ProcPtr + +# #### + +- typedef: + name: FormatIOUPP + type: ProcPtr + +# #### + +- typedef: + name: EditionOpenerUPP + type: ProcPtr + +# #### + +- struct: + name: SectionRecord + members: + - name: version + type: SignedByte + - name: kind + type: SectionType + - name: mode + type: UpdateMode + - name: mdDate + type: TimeStamp + - name: sectionID + type: int32_t + - name: refCon + type: int32_t + - name: alias + type: AliasHandle + - name: subPart + type: int32_t + - name: nextSection + type: Handle + comment: | + ### Section + - name: controlBlock + type: Handle + - name: refNum + type: EditionRefNum + size: 36 + +# #### + +- typedef: + name: SectionPtr + type: SectionRecord* + +# #### + +- typedef: + name: SectionHandle + type: SectionPtr* + +# #### + +- struct: + name: EditionContainerSpec + members: + - name: theFile + type: FSSpec + - name: theFileScript + type: ScriptCode + - name: thePart + type: int32_t + - name: thePartName + type: Str31 + - name: thePartScript + type: ScriptCode + +# #### + +- struct: + name: EditionContainerSpec + size: 110 + +# #### + +- typedef: + name: EditionContainerSpecPtr + type: EditionContainerSpec* + +# #### + +- struct: + name: EditionInfoRecord + members: + - name: crDate + type: TimeStamp + - name: mdDate + type: TimeStamp + - name: fdCreator + type: OSType + - name: fdType + type: OSType + - name: container + type: EditionContainerSpec + +# #### + +- struct: + name: EditionInfoRecord + size: 126 + +# #### + +- typedef: + name: EditionInfoPtr + type: EditionInfoRecord* + +# #### + +- struct: + name: NewPublisherReply + members: + - name: canceled + type: Boolean + - name: replacing + type: Boolean + - name: usePart + type: Boolean + - name: _filler + type: uint8_t + - name: preview + type: Handle + - name: previewFormat + type: FormatType + - name: container + type: EditionContainerSpec + +# #### + +- struct: + name: NewPublisherReply + size: 122 + +# #### + +- typedef: + name: NewPublisherReplyPtr + type: NewPublisherReply* + +# #### + +- struct: + name: NewSubscriberReply + members: + - name: canceled + type: Boolean + - name: formatsMask + type: SignedByte + - name: container + type: EditionContainerSpec + +# #### + +- struct: + name: NewSubscriberReply + size: 112 + +# #### + +- typedef: + name: NewSubscriberReplyPtr + type: NewSubscriberReply* + +# #### + +- struct: + name: SectionOptionsReply + members: + - name: canceled + type: Boolean + - name: changed + type: Boolean + - name: sectionH + type: SectionHandle + - name: action + type: ResType + +# #### + +- struct: + name: SectionOptionsReply + size: 10 + +# #### + +- typedef: + name: SectionOptionsReplyPtr + type: SectionOptionsReply* + +# #### + +- typedef: + name: EditionOpenerVerb + type: uint8_t + +# #### + +- enum: + values: + - name: eoOpen + value: 0 + - name: eoClose + value: 1 + - name: eoOpenNew + value: 2 + - name: eoCloseNew + value: 3 + - name: eoCanSubscribe + value: 4 + +# #### + +- struct: + name: EditionOpenerParamBlock + members: + - name: info + type: EditionInfoRecord + - name: sectionH + type: SectionHandle + - name: document + type: FSSpecPtr + - name: fdCreator + type: OSType + - name: ioRefNum + type: int32_t + - name: ioProc + type: FormatIOUPP + - name: success + type: Boolean + - name: formatsMask + type: SignedByte + +# #### + +- struct: + name: EditionOpenerParamBlock + size: 148 + +# #### + +- typedef: + name: EditionOpenerParamBlockPtr + type: EditionOpenerParamBlock* + +# #### + +- typedef: + name: FormatIOVerb + type: uint8_t + +# #### + +- enum: + values: + - name: ioHasFormat + value: 0 + - name: ioReadFormat + value: 1 + - name: ioNewFormat + value: 2 + - name: ioWtriteFormat + value: 3 + +# #### + +- struct: + name: FormatIOParamBlock + members: + - name: ioRefNum + type: int32_t + - name: format + type: FormatType + - name: formatIndex + type: int32_t + - name: offset + type: int32_t + - name: buffPtr + type: Ptr + - name: buffLen + type: int32_t + +# #### + +- struct: + name: FormatIOParamBlock + size: 24 + +# #### + +- typedef: + name: FormatIOParamBlockPtr + type: FormatIOParamBlock* + +# #### + +- enum: + values: + - name: flLckedErr + value: -45 + - name: fBusyErr + value: -47 + - name: userCanceledErr + value: -128 + - name: editionMgrInitErr + value: -450 + - name: badSectionErr + value: -451 + - name: notRegisteredSectionErr + value: -452 + - name: badSubPartErr + value: -454 + - name: multiplePubliserWrn + value: -460 + - name: containerNotFoundWrn + value: -461 + - name: notThePublisherWrn + value: -463 + +# #### + +- dispatcher: + name: Pack11 + trap: 0xA82D + selector-location: D0W + +# #### + +- function: + name: InitEditionPackVersion + return: OSErr + args: + - name: unused + type: INTEGER + dispatcher: Pack11 + selector: 0x0100 + executor: C_ + +# #### + +- function: + name: NewSection + return: OSErr + args: + - name: container + type: EditionContainerSpecPtr + - name: section_doc + type: FSSpecPtr + - name: kind + type: SectionType + - name: section_id + type: int32_t + - name: initial_mode + type: UpdateMode + - name: section_out + type: SectionHandle* + dispatcher: Pack11 + selector: 0x0A02 + executor: C_ + +# #### + +- function: + name: RegisterSection + return: OSErr + args: + - name: section_doc + type: FSSpecPtr + - name: section + type: SectionHandle + - name: alias_was_updated_p_out + type: Boolean* + dispatcher: Pack11 + selector: 0x0604 + executor: C_ + +# #### + +- function: + name: UnRegisterSection + return: OSErr + args: + - name: section + type: SectionHandle + dispatcher: Pack11 + selector: 0x0206 + executor: C_ + +# #### + +- function: + name: IsRegisteredSection + return: OSErr + args: + - name: section + type: SectionHandle + dispatcher: Pack11 + selector: 0x0208 + executor: C_ + +# #### + +- function: + name: AssociateSection + return: OSErr + args: + - name: section + type: SectionHandle + - name: new_section_doc + type: FSSpecPtr + dispatcher: Pack11 + selector: 0x040C + executor: C_ + +# #### + +- function: + name: CreateEditionContainerFile + return: OSErr + args: + - name: edition_file + type: FSSpecPtr + - name: creator + type: OSType + - name: edition_file_name_script + type: ScriptCode + dispatcher: Pack11 + selector: 0x050E + executor: C_ + +# #### + +- function: + name: DeleteEditionContainerFile + return: OSErr + args: + - name: edition_file + type: FSSpecPtr + dispatcher: Pack11 + selector: 0x0210 + executor: C_ + +# #### + +- function: + name: SetEditionFormatMark + return: OSErr + args: + - name: edition + type: EditionRefNum + - name: format + type: FormatType + - name: mark + type: int32_t + dispatcher: Pack11 + selector: 0x0620 + executor: C_ + +# #### + +- function: + name: GetEditionFormatMark + return: OSErr + args: + - name: edition + type: EditionRefNum + - name: format + type: FormatType + - name: currentMark + type: int32_t* + dispatcher: Pack11 + selector: 0x061E + executor: C_ + +# #### + +- function: + name: OpenEdition + return: OSErr + args: + - name: subscriber_section + type: SectionHandle + - name: ref_num + type: EditionRefNum* + dispatcher: Pack11 + selector: 0x0412 + executor: C_ + +# #### + +- function: + name: EditionHasFormat + return: OSErr + args: + - name: edition + type: EditionRefNum + - name: format + type: FormatType + - name: format_size + type: Size* + dispatcher: Pack11 + selector: 0x0618 + executor: C_ + +# #### + +- function: + name: ReadEdition + return: OSErr + args: + - name: edition + type: EditionRefNum + - name: format + type: FormatType + - name: buffer + type: Ptr + - name: buffer_size + type: Size + dispatcher: Pack11 + selector: 0x081A + executor: C_ + +# #### + +- function: + name: OpenNewEdition + return: OSErr + args: + - name: publisher_section + type: SectionHandle + - name: creator + type: OSType + - name: publisher_section_doc + type: FSSpecPtr + - name: ref_num + type: EditionRefNum* + dispatcher: Pack11 + selector: 0x0814 + executor: C_ + +# #### + +- function: + name: WriteEdition + return: OSErr + args: + - name: edition + type: EditionRefNum + - name: format + type: FormatType + - name: buffer + type: Ptr + - name: buffer_size + type: Size + dispatcher: Pack11 + selector: 0x081C + executor: C_ + +# #### + +- function: + name: CloseEdition + return: OSErr + args: + - name: edition + type: EditionRefNum + - name: success_p + type: Boolean + dispatcher: Pack11 + selector: 0x0316 + executor: C_ + +# #### + +- function: + name: GetLastEditionContainerUsed + return: OSErr + args: + - name: container + type: EditionContainerSpecPtr + dispatcher: Pack11 + selector: 0x0226 + executor: C_ + +# #### + +- function: + name: NewSubscriberDialog + return: OSErr + args: + - name: reply + type: NewSubscriberReplyPtr + dispatcher: Pack11 + selector: 0x0232 + executor: C_ + +# #### + +- function: + name: NewPublisherDialog + return: OSErr + args: + - name: reply + type: NewSubscriberReplyPtr + dispatcher: Pack11 + selector: 0x0236 + executor: C_ + +# #### + +- function: + name: SectionOptionsDialog + return: OSErr + args: + - name: reply + type: SectionOptionsReply* + dispatcher: Pack11 + selector: 0x023A + executor: C_ + +# #### + +- function: + name: NewSubscriberExpDialog + return: OSErr + args: + - name: reply + type: NewSubscriberReplyPtr + - name: where + type: Point + - name: expnasion_ditl_res_id + type: int16_t + - name: dialog_hook + type: ExpDialogHookUPP + - name: filter_hook + type: ExpModalFilterUPP + - name: data + type: Ptr + dispatcher: Pack11 + selector: 0x0B34 + executor: C_ + +# #### + +- function: + name: NewPublisherExpDialog + return: OSErr + args: + - name: reply + type: NewPublisherReplyPtr + - name: where + type: Point + - name: expnasion_ditl_res_id + type: int16_t + - name: dialog_hook + type: ExpDialogHookUPP + - name: filter_hook + type: ExpModalFilterUPP + - name: data + type: Ptr + dispatcher: Pack11 + selector: 0x0B38 + executor: C_ + +# #### + +- function: + name: SectionOptionsExpDialog + return: OSErr + args: + - name: reply + type: SectionOptionsReply* + - name: where + type: Point + - name: expnasion_ditl_res_id + type: int16_t + - name: dialog_hook + type: ExpDialogHookUPP + - name: filter_hook + type: ExpModalFilterUPP + - name: data + type: Ptr + dispatcher: Pack11 + selector: 0x0B3C + executor: C_ + +# #### + +- function: + name: GetEditionInfo + return: OSErr + args: + - name: section + type: SectionHandle + - name: edition_info + type: EditionInfoPtr + dispatcher: Pack11 + selector: 0x0422 + executor: C_ + +# #### + +- function: + name: GoToPublisherSection + return: OSErr + args: + - name: container + type: EditionContainerSpecPtr + dispatcher: Pack11 + selector: 0x0224 + executor: C_ + +# #### + +- function: + name: GetStandardFormats + return: OSErr + args: + - name: container + type: EditionContainerSpecPtr + - name: preview_format + type: FormatType* + - name: preview + type: Handle + - name: publisher_alias + type: Handle + - name: formats + type: Handle + dispatcher: Pack11 + selector: 0x0A28 + executor: C_ + +# #### + +- function: + name: GetEditionOpenerProc + return: OSErr + args: + - name: opener + type: EditionOpenerUPP* + dispatcher: Pack11 + selector: 0x022A + executor: C_ + +# #### + +- function: + name: SetEditionOpenerProc + return: OSErr + args: + - name: opener + type: EditionOpenerUPP + dispatcher: Pack11 + selector: 0x022C + executor: C_ + +# #### + +- function: + name: CallEditionOpenerProc + return: OSErr + args: + - name: selector + type: EditionOpenerVerb + - name: param_block + type: EditionOpenerParamBlock* + - name: opener + type: EditionOpenerUPP + dispatcher: Pack11 + selector: 0x052E + executor: C_ + +# #### + +- function: + name: CallFormatIOProc + return: OSErr + args: + - name: selector + type: FormatIOVerb + - name: param_block + type: FormatIOParamBlock* + - name: proc + type: FormatIOUPP + dispatcher: Pack11 + selector: 0x0530 + executor: C_ diff --git a/defs/EventMgr.yaml b/defs/EventMgr.yaml new file mode 100644 index 0000000..390e51d --- /dev/null +++ b/defs/EventMgr.yaml @@ -0,0 +1,144 @@ +- enum: + values: + - name: nullEvent + value: 0 + - name: mouseDown + value: 1 + - name: mouseUp + value: 2 + - name: keyDown + value: 3 + - name: keyUp + value: 4 + - name: autoKey + value: 5 + - name: updateEvt + value: 6 + - name: diskEvt + value: 7 + - name: activateEvt + value: 8 + - name: networkEvt + value: 10 + - name: driverEvt + value: 11 + - name: app1Evt + value: 12 + - name: app2Evt + value: 13 + - name: app3Evt + value: 14 + - name: app4Evt + value: 15 + - name: kHighLevelEvent + value: 23 + +# #### + +- enum: + values: + - name: charCodeMask + value: 0xFF + - name: keyCodeMask + value: 0xFF00 + +# #### + +- enum: + values: + - name: mDownMask + value: 2 + - name: mUpMask + value: 4 + - name: keyDownMask + value: 8 + - name: keyUpMask + value: 16 + - name: autoKeyMask + value: 32 + - name: updateMask + value: 64 + - name: diskMask + value: 128 + - name: activMask + value: 256 + +# #### + +- enum: + values: + - name: highLevelEventMask + value: 1024 + - name: driverMask + value: 2048 + - name: app1Mask + value: 4096 + - name: app2Mask + value: 8192 + - name: app3Mask + value: 16384 + - name: app4Mask + value: -32768 + - name: everyEvent + value: -1 + comment: | + #define networkMask 1024 + +# #### + +- enum: + values: + - name: activeFlag + value: 1 + - name: changeFlag + value: 2 + - name: btnState + value: 128 + - name: cmdKey + value: 256 + - name: shiftKey + value: 512 + - name: alphaLock + value: 1024 + - name: optionKey + value: 2048 + - name: ControlKey + value: 4096 + +# #### + +- enum: + values: + - name: rightShiftKey + value: 0x2000 + - name: rightOptionKey + value: 0x4000 + - name: rightControlKey + value: 0x8000 + +# #### + +- struct: + name: EventRecord + members: + - name: what + type: INTEGER + - name: message + type: LONGINT + - name: when + type: LONGINT + - name: where + type: Point + - name: modifiers + type: INTEGER + size: 16 + +# #### + +- lowmem: + name: KeyMap + type: uint8_t[16] + address: 0x174 + comment: | + was LONGINT KeypadMap[2]; + EventMgr SysEqu.a (true-b); diff --git a/defs/FileMgr.yaml b/defs/FileMgr.yaml new file mode 100644 index 0000000..6525d6f --- /dev/null +++ b/defs/FileMgr.yaml @@ -0,0 +1,3294 @@ +- executor_only: + code: | + //So as to not conflict with OS X defines + #undef PBGetVInfo + #undef PBXGetVolInfo + #undef PBGetVol + #undef PBSetVol + #undef PBFlushVol + #undef PBCreate + #undef PBDelete + #undef PBOpenDF + #undef PBOpenRF + #undef PBRename + #undef PBGetFInfo + #undef PBSetFInf + #undef PBSetFLock + #undef PBRstFLock + #undef PBSetFVers + #undef PBAllocate + #undef PBGetEOF + #undef PBSetEOF + #undef PBGetFPos + #undef PBSetFPos + #undef PBFlushFile + #undef PBCatSearch + #undef PBOpenWD + #undef PBCloseWD + #undef PBHSetVol + #undef PBHGetVol + #undef PBCatMove + #undef PBDirCreate + #undef PBGetWDInfo + #undef PBGetFCBInfo + #undef PBGetCatInfo + #undef PBSetCatInfo + #undef PBAllocContig + #undef PBLockRange + #undef PBUnlockRange + #undef PBSetVInfo + #undef PBHGetVInfo + #undef PBHOpen + #undef PBHOpenRF + #undef PBHOpenDF + #undef PBHCreate + #undef PBHDelete + #undef PBHRename + #undef PBHRstFLock + #undef PBHSetFLock + #undef PBHGetFInfo + #undef PBHSetFInfo + #undef PBMakeFSSpec + #undef PBHGetVolParms + #undef PBHGetLogInInfo + #undef PBHGetDirAccess + #undef PBHSetDirAccess + #undef PBHMapID + #undef PBHMapName + #undef PBHCopyFile + #undef PBHMoveRename + #undef PBHOpenDeny + #undef PBHOpenRFDeny + #undef PBExchangeFiles + #undef PBCreateFileIDRef + #undef PBResolveFileIDRef + #undef PBDeleteFileIDRef + #undef PBGetForeignPrivs + #undef PBSetForeignPrivs + #undef PBDTAddIcon + #undef PBDTGetIcon + #undef PBDTGetIconInfo + #undef PBDTAddAPPL + #undef PBDTRemoveAPPL + #undef PBDTGetAPPL + #undef PBDTSetComment + #undef PBDTRemoveComment + #undef PBDTGetComment + #undef PBDTFlush + #undef PBDTReset + #undef PBDTGetInfo + #undef PBDTDelete + #undef PBSetFInfo + #undef PBGetFInfo + +# #### + +- enum: + values: + - name: fOnDesk + value: 1 + - name: fHasBundle + value: 8192 + - name: fInvisible + value: 16384 + - name: fTrash + value: -3 + - name: fDesktop + value: -2 + - name: fDisk + value: 0 + +# #### + +- enum: + values: + - name: fsCurPerm + value: 0 + - name: fsRdPerm + value: 1 + - name: fsWrPerm + value: 2 + - name: fsRdWrPerm + value: 3 + - name: fsRdWrShPerm + value: 4 + - name: fsRdDenyPerm + value: 0x10 + - name: fsWrDenyPerm + value: 0x20 + +# #### + +- enum: + values: + - name: fsAtMark + value: 0 + - name: fsFromStart + value: 1 + - name: fsFromLEOF + value: 2 + - name: fsFromMark + value: 3 + - name: rdVerify + value: 64 + +# #### + +- enum: + values: + - name: badMDBErr + value: -60 + - name: badMovErr + value: -122 + - name: bdNamErr + value: -37 + - name: dirFulErr + value: -33 + - name: dskFulErr + value: -34 + - name: dupFNErr + value: -48 + - name: eofErr + value: -39 + - name: extFSErr + value: -58 + - name: fBsyErr + value: -47 + - name: fLckdErr + value: -45 + - name: fnfErr + value: -43 + - name: fnOpnErr + value: -38 + - name: fsRnErr + value: -59 + - name: gfpErr + value: -52 + - name: ioErr + value: -36 + - name: noMacDskErr + value: -57 + - name: nsDrvErr + value: -56 + - name: nsvErr + value: -35 + - name: opWrErr + value: -49 + - name: permErr + value: -54 + - name: posErr + value: -40 + - name: rfNumErr + value: -51 + - name: tmfoErr + value: -42 + - name: volOffLinErr + value: -53 + - name: volOnLinErr + value: -55 + - name: vLckdErr + value: -46 + - name: wrgVolTypErr + value: -123 + - name: wrPermErr + value: -61 + - name: wPrErr + value: -44 + - name: tmwdoErr + value: -121 + - name: dirNFErr + value: -120 + - name: fsDSIntErr + value: -127 + +# #### + +- enum: + values: + - name: wrgVolTypeErr + value: -123 + - name: diffVolErr + value: -1303 + +# #### + +- struct: + members: + - name: fdType + type: OSType + - name: fdCreator + type: OSType + - name: fdFlags + type: uint16_t + - name: fdLocation + type: Point + - name: fdFldr + type: uint16_t + name: FInfo + size: 16 + +# #### + +- struct: + members: + - name: fdIconID + type: uint16_t + - name: fdUnused + type: uint16_t[4] + - name: fdComment + type: uint16_t + - name: fdPutAway + type: LONGINT + name: FXInfo + size: 16 + +# #### + +- struct: + members: + - name: frRect + type: Rect + - name: frFlags + type: uint16_t + - name: frLocation + type: Point + - name: frView + type: uint16_t + name: DInfo + size: 16 + +# #### + +- struct: + members: + - name: frScroll + type: Point + - name: frOpenChain + type: LONGINT + - name: frUnused + type: uint16_t + - name: frComment + type: uint16_t + - name: frPutAway + type: LONGINT + name: DXInfo + size: 16 + +# #### + +- enum: + values: + - name: ioParamType + - name: fileParamType + - name: volumeParamType + - name: cntrlParamType + name: ParamBlkType + +# #### + +- executor_only: + code: | + #define COMMONFSQUEUEDEFS \ + GUEST qLink; \ + GUEST qType; \ + GUEST ioTrap; \ + GUEST ioCmdAddr; \ + GUEST ioCompletion; \ + GUEST ioResult; \ + GUEST ioNamePtr; \ + GUEST ioVRefNum + +# #### + +- only-for: executor + typedef: + name: IOMiscType + type: uint32_t + comment: | + Executor needs ioMisc to be uint32_t instead of the normal + Ptr, so this is defined as a separate typedef here. + +- not-for: executor + typedef: + name: IOMiscType + type: Ptr + comment: | + Executor needs ioMisc to be uint32_t instead of the normal + Ptr, so this is defined as a separate typedef here. + + +# #### + +- struct: + members: + - common: COMMONFSQUEUEDEFS + - name: ioRefNum + type: INTEGER + - name: ioVersNum + type: SignedByte + - name: ioPermssn + type: SignedByte + - name: ioMisc + type: IOMiscType + comment: | + should be largest of Ptr, LONGINT + - name: ioBuffer + type: Ptr + - name: ioReqCount + type: LONGINT + - name: ioActCount + type: LONGINT + - name: ioPosMode + type: INTEGER + - name: ioPosOffset + type: LONGINT + name: IOParam + size: 50 + +# #### + +- struct: + members: + - common: COMMONFSQUEUEDEFS + - name: ioFRefNum + type: INTEGER + - name: ioFVersNum + type: SignedByte + - name: filler1 + type: SignedByte + - name: ioFDirIndex + type: INTEGER + - name: ioFlAttrib + type: SignedByte + - name: ioFlVersNum + type: SignedByte + - name: ioFlFndrInfo + type: FInfo + - name: ioFlNum + type: LONGINT + - name: ioFlStBlk + type: INTEGER + - name: ioFlLgLen + type: LONGINT + - name: ioFlPyLen + type: LONGINT + - name: ioFlRStBlk + type: INTEGER + - name: ioFlRLgLen + type: LONGINT + - name: ioFlRPyLen + type: LONGINT + - name: ioFlCrDat + type: LONGINT + - name: ioFlMdDat + type: LONGINT + name: FileParam + size: 80 + +# #### + +- struct: + members: + - common: COMMONFSQUEUEDEFS + - name: filler2 + type: LONGINT + - name: ioVolIndex + type: INTEGER + - name: ioVCrDate + type: LONGINT + - name: ioVLsBkUp + type: LONGINT + - name: ioVAtrb + type: uint16_t + - name: ioVNmFls + type: uint16_t + - name: ioVDirSt + type: uint16_t + - name: ioVBlLn + type: uint16_t + - name: ioVNmAlBlks + type: uint16_t + - name: ioVAlBlkSiz + type: LONGINT + - name: ioVClpSiz + type: LONGINT + - name: ioAlBlSt + type: uint16_t + - name: ioVNxtFNum + type: LONGINT + - name: ioVFrBlk + type: uint16_t + name: VolumeParam + size: 64 + +# #### + +- struct: + members: + - common: COMMONFSQUEUEDEFS + - name: ioCRefNum + type: INTEGER + - name: csCode + type: INTEGER + - name: csParam + type: INTEGER[11] + name: CntrlParam + size: 50 + +# #### + +- union: + members: + - name: ioParam + type: IOParam + - name: fileParam + type: FileParam + - name: volumeParam + type: VolumeParam + - name: cntrlParam + type: CntrlParam + name: ParamBlockRec + size: 80 + +# #### + +- typedef: + name: ParmBlkPtr + type: ParamBlockRec* + +# #### + +- struct: + members: + - common: COMMONFSQUEUEDEFS + - name: ioRefNum + type: INTEGER + - name: ioVersNum + type: SignedByte + - name: ioPermssn + type: SignedByte + - name: ioMisc + type: IOMiscType + comment: | + should be largest of Ptr, LONGINT + - name: ioBuffer + type: Ptr + - name: ioReqCount + type: LONGINT + - name: ioActCount + type: LONGINT + - name: ioPosMode + type: INTEGER + - name: ioPosOffset + type: LONGINT + name: HIoParam + size: 50 + +# #### + +- struct: + members: + - common: COMMONFSQUEUEDEFS + - name: ioFRefNum + type: INTEGER + - name: ioFVersNum + type: SignedByte + - name: filler1 + type: SignedByte + - name: ioFDirIndex + type: INTEGER + - name: ioFlAttrib + type: SignedByte + - name: ioFlVersNum + type: SignedByte + - name: ioFlFndrInfo + type: FInfo + - name: ioDirID + type: LONGINT + comment: | + --> + - name: ioFlStBlk + type: INTEGER + - name: ioFlLgLen + type: LONGINT + - name: ioFlPyLen + type: LONGINT + - name: ioFlRStBlk + type: INTEGER + - name: ioFlRLgLen + type: LONGINT + - name: ioFlRPyLen + type: LONGINT + - name: ioFlCrDat + type: LONGINT + - name: ioFlMdDat + type: LONGINT + name: HFileParam + size: 80 + +# #### + +- struct: + members: + - common: COMMONFSQUEUEDEFS + - name: pfiller2 + type: LONGINT + - name: ioVolIndex + type: INTEGER + - name: ioVCrDate + type: LONGINT + - name: ioVLsMod + type: LONGINT + comment: | + --> + - name: ioVAtrb + type: INTEGER + - name: ioVNmFls + type: uint16_t + - name: ioVBitMap + type: uint16_t + comment: | + --> + - name: ioVAllocPtr + type: uint16_t + comment: | + --> + - name: ioVNmAlBlks + type: uint16_t + - name: ioVAlBlkSiz + type: LONGINT + - name: ioVClpSiz + type: LONGINT + - name: ioAlBlSt + type: uint16_t + - name: ioVNxtCNID + type: LONGINT + comment: | + --> + - name: ioVFrBlk + type: uint16_t + - name: ioVSigWord + type: uint16_t + comment: | + --> + - name: ioVDrvInfo + type: INTEGER + comment: | + --> + - name: ioVDRefNum + type: INTEGER + comment: | + --> + - name: ioVFSID + type: INTEGER + comment: | + --> + - name: ioVBkUp + type: LONGINT + comment: | + --> + - name: ioVSeqNum + type: uint16_t + comment: | + --> + - name: ioVWrCnt + type: LONGINT + comment: | + --> + - name: ioVFilCnt + type: LONGINT + comment: | + --> + - name: ioVDirCnt + type: LONGINT + comment: | + --> + - name: ioVFndrInfo + type: LONGINT[8] + comment: | + --> + name: HVolumeParam + size: 122 + +# #### + +- union: + members: + - name: ioParam + type: HIoParam + - name: fileParam + type: HFileParam + - name: volumeParam + type: HVolumeParam + name: HParamBlockRec + size: 122 + +# #### + +- typedef: + name: HParmBlkPtr + type: HParamBlockRec* + +# #### + +- enum: + values: + - name: hfileInfo + - name: dirInfo + name: CInfoType + +# #### + +- executor_only: + code: | + #define COMMONCINFODEFS \ + COMMONFSQUEUEDEFS; \ + GUEST ioFRefNum; \ + GUEST ioFVersNum; \ + GUEST filler1; \ + GUEST ioFDirIndex; \ + GUEST ioFlAttrib; \ + GUEST ioACUser + +# #### + +- struct: + members: + - common: COMMONCINFODEFS + - name: ioFlFndrInfo + type: FInfo + - name: ioDirID + type: LONGINT + - name: ioFlStBlk + type: INTEGER + - name: ioFlLgLen + type: LONGINT + - name: ioFlPyLen + type: LONGINT + - name: ioFlRStBlk + type: INTEGER + - name: ioFlRLgLen + type: LONGINT + - name: ioFlRPyLen + type: LONGINT + - name: ioFlCrDat + type: LONGINT + - name: ioFlMdDat + type: LONGINT + - name: ioFlBkDat + type: LONGINT + - name: ioFlXFndrInfo + type: FXInfo + - name: ioFlParID + type: LONGINT + - name: ioFlClpSiz + type: LONGINT + name: HFileInfo + size: 108 + +# #### + +- struct: + members: + - common: COMMONCINFODEFS + - name: ioDrUsrWds + type: DInfo + - name: ioDrDirID + type: LONGINT + - name: ioDrNmFls + type: uint16_t + - name: filler3 + type: uint16_t[9] + - name: ioDrCrDat + type: LONGINT + - name: ioDrMdDat + type: LONGINT + - name: ioDrBkDat + type: LONGINT + - name: ioDrFndrInfo + type: DXInfo + - name: ioDrParID + type: LONGINT + name: DirInfo + size: 104 + +# #### + +- union: + members: + - name: hFileInfo + type: HFileInfo + - name: dirInfo + type: DirInfo + name: CInfoPBRec + size: 108 + +# #### + +- typedef: + name: CInfoPBPtr + type: CInfoPBRec* + +# #### + +- struct: + members: + - common: COMMONFSQUEUEDEFS + - name: filler1 + type: LONGINT + - name: ioNewName + type: StringPtr + - name: filler2 + type: LONGINT + - name: ioNewDirID + type: LONGINT + - name: filler3 + type: LONGINT[2] + - name: ioDirID + type: LONGINT + name: CMovePBRec + size: 52 + +# #### + +- typedef: + name: CMovePBPtr + type: CMovePBRec* + +# #### + +- struct: + name: WDPBRec + members: + - common: COMMONFSQUEUEDEFS + - name: filler1 + type: uint16_t + - name: ioWDIndex + type: INTEGER + - name: ioWDProcID + type: LONGINT + - name: ioWDVRefNum + type: INTEGER + - name: filler2 + type: INTEGER[7] + - name: ioWDDirID + type: LONGINT + size: 52 + +# #### + +- typedef: + name: WDPBPtr + type: WDPBRec* + +# #### + +- struct: + name: FCBPBRec + members: + - common: COMMONFSQUEUEDEFS + - name: ioRefNum + type: INTEGER + - name: filler + type: uint16_t + - name: ioFCBIndx + type: INTEGER + - name: ioFCBobnoxiousfiller + type: INTEGER + comment: | + ACK! not in IMIV, but ThinkC+MPW + - name: ioFCBFlNm + type: LONGINT + - name: ioFCBFlags + type: uint16_t + - name: ioFCBStBlk + type: INTEGER + - name: ioFCBEOF + type: LONGINT + - name: ioFCBPLen + type: LONGINT + - name: ioFCBCrPs + type: LONGINT + - name: ioFCBVRefNum + type: INTEGER + - name: ioFCBClpSiz + type: LONGINT + - name: ioFCBParID + type: LONGINT + size: 62 + +# #### + +- typedef: + name: FCBPBPtr + type: FCBPBRec* + +# #### + +- struct: + name: VCB + members: + - name: qLink + type: QElemPtr + comment: | + 0 + - name: qType + type: INTEGER + comment: | + 4 + - name: vcbFlags + type: uint16_t + comment: | + 6 + - name: vcbSigWord + type: uint16_t + comment: | + 8 + - name: vcbCrDate + type: LONGINT + comment: | + 10 + - name: vcbLsMod + type: LONGINT + comment: | + 14 + - name: vcbAtrb + type: uint16_t + comment: | + 18 + - name: vcbNmFls + type: uint16_t + comment: | + 20 + - name: vcbVBMSt + type: uint16_t + comment: | + 22 + - name: vcbAllocPtr + type: uint16_t + comment: | + 24 + - name: vcbNmAlBlks + type: uint16_t + comment: | + 26 + - name: vcbAlBlkSiz + type: LONGINT + comment: | + 28 + - name: vcbClpSiz + type: LONGINT + comment: | + 32 + - name: vcbAlBlSt + type: uint16_t + comment: | + 36 + - name: vcbNxtCNID + type: LONGINT + comment: | + 38 + - name: vcbFreeBks + type: uint16_t + comment: | + 42 + - name: vcbVN + type: Byte[28] + comment: | + 44 + - name: vcbDrvNum + type: INTEGER + comment: | + 72 + - name: vcbDRefNum + type: INTEGER + comment: | + 74 + - name: vcbFSID + type: INTEGER + comment: | + 76 + - name: vcbVRefNum + type: INTEGER + comment: | + 78 + - name: vcbMAdr + type: Ptr + - name: vcbBufAdr + type: Ptr + - name: vcbMLen + type: uint16_t + - name: vcbDirIndex + type: INTEGER + - name: vcbDirBlk + type: uint16_t + - name: vcbVolBkUp + type: LONGINT + - name: vcbVSeqNum + type: uint16_t + - name: vcbWrCnt + type: LONGINT + - name: vcbXTClpSiz + type: LONGINT + - name: vcbCTClpSiz + type: LONGINT + - name: vcbNmRtDirs + type: uint16_t + - name: vcbFilCnt + type: LONGINT + - name: vcbDirCnt + type: LONGINT + - name: vcbFndrInfo + type: LONGINT[8] + - name: vcbVCSize + type: uint16_t + - name: vcbVBMCSiz + type: uint16_t + - name: vcbCtlCSiz + type: uint16_t + - name: vcbXTAlBlks + type: uint16_t + - name: vcbCTAlBlks + type: uint16_t + - name: vcbXTRef + type: INTEGER + - name: vcbCTRef + type: INTEGER + - name: vcbCtlBuf + type: Ptr + - name: vcbDirIDM + type: LONGINT + - name: vcbOffsM + type: uint16_t + size: 178 + +# #### + +- typedef: + name: VCBPtr + type: VCB* + +# #### + +- struct: + name: DrvQEl + members: + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: dQDrive + type: INTEGER + - name: dQRefNum + type: INTEGER + - name: dQFSID + type: INTEGER + - name: dQDrvSz + type: uint16_t + - name: dQDrvSz2 + type: uint16_t + size: 16 + +# #### + +- struct: + name: FSSpec + members: + - name: vRefNum + type: INTEGER + - name: parID + type: LONGINT + - name: name + type: Str63 + comment: | + data types introduced by the new high level file system dispatch + traps + +# #### + +- struct: + name: FSSpec + size: 70 + +# #### + +- typedef: + name: FSSpecPtr + type: FSSpec* + +# #### + +- typedef: + name: FSSpecArrayPtr + type: FSSpecPtr + +# #### + +- lowmem: + name: BootDrive + type: INTEGER + address: 0x210 + comment: | + FileMgr IMIV-212 (true); + +# #### + +- lowmem: + name: DrvQHdr + type: QHdr + address: 0x308 + comment: | + FileMgr IMIV-182 (true); + +# #### + +- lowmem: + name: EjectNotify + type: ProcPtr + address: 0x338 + comment: | + FileMgr ThinkC (false); + +# #### + +- lowmem: + name: FCBSPtr + type: Ptr + address: 0x34E + comment: | + FileMgr IMIV-179 (true); + +# #### + +- lowmem: + name: DefVCBPtr + type: VCBPtr + address: 0x352 + comment: | + FileMgr IMIV-178 (true); + +# #### + +- lowmem: + name: VCBQHdr + type: QHdr + address: 0x356 + comment: | + FileMgr IMIV-178 (true); + +# #### + +- lowmem: + name: FSQHdr + type: QHdr + address: 0x360 + comment: | + FileMgr IMIV-176 (true); + +# #### + +- lowmem: + name: WDCBsPtr + type: Ptr + address: 0x372 + comment: | + FileMgr idunno (true); + +# #### + +- lowmem: + name: DefVRefNum + type: INTEGER + address: 0x384 + comment: | + FileMgr MPW (true); + +# #### + +- lowmem: + name: ToExtFS + type: Ptr + address: 0x3F2 + comment: | + * Note: MacLinkPC+ loads 0x358 into a register (i.e. the address of the + * pointer to the first element on the VCB queue) and then uses + * 72 off of it (0x3A0) and 78 off of it (0x3A6). As long as + * there are zeros there, that doesn't hurt us, but normally, + * we'd have negative ones in there. Hence we describe them + * here and set them to zero in executor. + const LowMemGlobal FmtDefaults { 0x39E }; // FileMgr ThinkC (false); + FileMgr IMIV-212 (false); + +# #### + +- lowmem: + name: FSFCBLen + type: INTEGER + address: 0x3F6 + comment: | + FileMgr IMIV-97 (true); + +# #### + +- function: + name: FSOpen + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + - name: rn + type: INTEGER* + executor: true + +# #### + +- function: + name: OpenRF + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + - name: rn + type: INTEGER* + executor: true + +# #### + +- function: + name: OpenDF + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + - name: rn + type: INTEGER* + executor: true + +# #### + +- function: + name: FSRead + return: OSErr + args: + - name: rn + type: INTEGER + - name: count + type: LONGINT* + - name: buffp + type: void* + executor: true + +# #### + +- function: + name: FSWrite + return: OSErr + args: + - name: rn + type: INTEGER + - name: count + type: LONGINT* + - name: buffp + type: const void* + executor: true + +# #### + +- function: + name: GetFPos + return: OSErr + args: + - name: rn + type: INTEGER + - name: filep + type: LONGINT* + executor: true + +# #### + +- function: + name: SetFPos + return: OSErr + args: + - name: rn + type: INTEGER + - name: posmode + type: INTEGER + - name: possoff + type: LONGINT + executor: true + +# #### + +- function: + name: GetEOF + return: OSErr + args: + - name: rn + type: INTEGER + - name: eof + type: LONGINT* + executor: true + +# #### + +- function: + name: SetEOF + return: OSErr + args: + - name: rn + type: INTEGER + - name: eof + type: LONGINT + executor: true + +# #### + +- function: + name: Allocate + return: OSErr + args: + - name: rn + type: INTEGER + - name: count + type: LONGINT* + executor: true + +# #### + +- function: + name: AllocContig + return: OSErr + args: + - name: rn + type: INTEGER + - name: count + type: LONGINT* + executor: true + +# #### + +- function: + name: FSClose + return: OSErr + args: + - name: rn + type: INTEGER + executor: true + +# #### + +- function: + name: Create + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + - name: creator + type: OSType + - name: filtyp + type: OSType + executor: true + +# #### + +- function: + name: FSDelete + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + executor: true + +# #### + +- function: + name: GetFInfo + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + - name: fndrinfo + type: FInfo* + executor: true + +# #### + +- function: + name: HGetFInfo + return: OSErr + args: + - name: vref + type: INTEGER + - name: dirid + type: LONGINT + - name: name + type: ConstStringPtr + - name: fndrinfo + type: FInfo* + executor: true + +# #### + +- function: + name: SetFInfo + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + - name: fndrinfo + type: FInfo* + executor: true + +# #### + +- function: + name: SetFLock + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + executor: true + +# #### + +- function: + name: RstFLock + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + executor: true + +# #### + +- function: + name: Rename + return: OSErr + args: + - name: filen + type: ConstStringPtr + - name: vrn + type: INTEGER + - name: newf + type: ConstStringPtr + executor: true + +# #### + +- function: + name: FInitQueue + trap: 0xA016 + executor: C_ + +# #### + +- function: + name: GetFSQHdr + return: QHdrPtr + executor: C_ + +# #### + +- function: + name: GetVCBQHdr + return: QHdrPtr + executor: C_ + +# #### + +- function: + name: GetDrvQHdr + return: QHdrPtr + executor: C_ + +# #### + +- function: + name: GetVInfo + return: OSErr + args: + - name: drv + type: INTEGER + - name: voln + type: StringPtr + - name: vrn + type: INTEGER* + - name: freeb + type: LONGINT* + +# #### + +- function: + name: GetVRefNum + return: OSErr + args: + - name: prn + type: INTEGER + - name: vrn + type: INTEGER* + +# #### + +- function: + name: GetVol + return: OSErr + args: + - name: voln + type: StringPtr + - name: vrn + type: INTEGER* + executor: true + +# #### + +- function: + name: SetVol + return: OSErr + args: + - name: voln + type: ConstStringPtr + - name: vrn + type: INTEGER + executor: true + +# #### + +- function: + name: FlushVol + return: OSErr + args: + - name: voln + type: ConstStringPtr + - name: vrn + type: INTEGER + executor: true + +# #### + +- function: + name: UnmountVol + return: OSErr + args: + - name: voln + type: ConstStringPtr + - name: vrn + type: INTEGER + executor: true + +# #### + +- function: + name: Eject + return: OSErr + args: + - name: voln + type: ConstStringPtr + - name: vrn + type: INTEGER + executor: true + +# #### + +- function: + name: PBAllocContig + return: OSErr + args: + - name: pb + type: ParmBlkPtr + - name: async + type: Boolean + +# #### + +- function: + name: PBOpen + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + comment: | + TODO: Trap? + executor: true + file_trap: mfs + trap: 0xA000 + returnreg: D0 + variants: + - PBOpenSync + - PBOpenAsync + +# #### + +- function: + name: PBHOpen + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41472 + returnreg: D0 + variants: + - PBHOpenSync + - PBHOpenAsync + +# #### + +- function: + name: PBClose + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA001 + returnreg: D0 + variants: + - PBCloseSync + - PBCloseAsync + +# #### + +- function: + name: PBRead + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA002 + returnreg: D0 + variants: + - PBReadSync + - PBReadAsync + +# #### + +- function: + name: PBWrite + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA003 + returnreg: D0 + variants: + - PBWriteSync + - PBWriteAsync + +# #### + +- function: + name: PBGetVInfo + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA007 + returnreg: D0 + variants: + - PBGetVInfoSync + - PBGetVInfoAsync + +# #### + +- function: + name: PBHGetVInfo + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41479 + returnreg: D0 + variants: + - PBHGetVInfoSync + - PBHGetVInfoAsync + +# #### + +- function: + name: PBCreate + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA008 + returnreg: D0 + variants: + - PBCreateSync + - PBCreateAsync + +# #### + +- function: + name: PBHCreate + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41480 + returnreg: D0 + variants: + - PBHCreateSync + - PBHCreateAsync + +# #### + +- function: + name: PBDelete + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA009 + returnreg: D0 + variants: + - PBDeleteSync + - PBDeleteAsync + +# #### + +- function: + name: PBHDelete + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41481 + returnreg: D0 + variants: + - PBHDeleteSync + - PBHDeleteAsync + +# #### + +- function: + name: PBOpenRF + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA00A + returnreg: D0 + variants: + - PBOpenRFSync + - PBOpenRFAsync + +# #### + +- function: + name: PBHOpenRF + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41482 + returnreg: D0 + variants: + - PBHOpenRFSync + - PBHOpenRFAsync + +# #### + +- function: + name: PBRename + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA00B + returnreg: D0 + variants: + - PBRenameSync + - PBRenameAsync + +# #### + +- function: + name: PBHRename + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41483 + returnreg: D0 + variants: + - PBHRenameSync + - PBHRenameAsync + +# #### + +- function: + name: PBGetFInfo + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA00C + returnreg: D0 + variants: + - PBGetFInfoSync + - PBGetFInfoAsync + +# #### + +- function: + name: PBHGetFInfo + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41484 + returnreg: D0 + variants: + - PBHGetFInfoSync + - PBHGetFInfoAsync + +# #### + +- function: + name: PBSetFInfo + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA00D + returnreg: D0 + variants: + - PBSetFInfoSync + - PBSetFInfoAsync + +# #### + +- function: + name: PBHSetFInfo + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41485 + returnreg: D0 + variants: + - PBHSetFInfoSync + - PBHSetFInfoAsync + +# #### + +- function: + name: PBUnmountVol + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + executor: true + trap: 0xA00E + returnreg: D0 + +# #### + +- function: + name: PBMountVol + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + executor: true + trap: 0xA00F + returnreg: D0 + +# #### + +- function: + name: PBAllocate + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA010 + returnreg: D0 + variants: + - PBAllocateSync + - PBAllocateAsync + +# #### + +- function: + name: PBGetEOF + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA011 + returnreg: D0 + variants: + - PBGetEOFSync + - PBGetEOFAsync + +# #### + +- function: + name: PBSetEOF + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA012 + returnreg: D0 + variants: + - PBSetEOFSync + - PBSetEOFAsync + +# #### + +- function: + name: PBFlushVol + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA013 + returnreg: D0 + variants: + - PBFlushVolSync + - PBFlushVolAsync + +# #### + +- function: + name: PBGetVol + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA014 + returnreg: D0 + variants: + - PBGetVolSync + - PBGetVolAsync + +# #### + +- function: + name: PBHGetVol + return: OSErr + args: + - name: pb + type: WDPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41492 + returnreg: D0 + variants: + - PBHGetVolSync + - PBHGetVolAsync + +# #### + +- function: + name: PBSetVol + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA015 + returnreg: D0 + variants: + - PBSetVolSync + - PBSetVolAsync + +# #### + +- function: + name: PBHSetVol + return: OSErr + args: + - name: pb + type: WDPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41493 + returnreg: D0 + variants: + - PBHSetVolSync + - PBHSetVolAsync + +# #### + +- function: + name: PBEject + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + executor: true + trap: 0xA017 + returnreg: D0 + +# #### + +- function: + name: PBGetFPos + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA018 + returnreg: D0 + variants: + - PBGetFPosSync + - PBGetFPosAsync + +# #### + +- function: + name: PBOffLine + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + executor: true + trap: 0xA035 + returnreg: D0 + +# #### + +- function: + name: PBSetFLock + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA041 + returnreg: D0 + variants: + - PBSetFLockSync + - PBSetFLockAsync + +# #### + +- function: + name: PBHSetFLock + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41537 + returnreg: D0 + variants: + - PBHSetFLockSync + - PBHSetFLockAsync + +# #### + +- function: + name: PBRstFLock + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA042 + returnreg: D0 + variants: + - PBRstFLockSync + - PBRstFLockAsync + +# #### + +- function: + name: PBHRstFLock + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41538 + returnreg: D0 + variants: + - PBHRstFLockSync + - PBHRstFLockAsync + +# #### + +- function: + name: PBSetFVers + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA043 + returnreg: D0 + variants: + - PBSetFVersSync + - PBSetFVersAsync + +# #### + +- function: + name: PBSetFPos + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA044 + returnreg: D0 + variants: + - PBSetFPosSync + - PBSetFPosAsync + +# #### + +- function: + name: PBFlushFile + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA045 + returnreg: D0 + variants: + - PBFlushFileSync + - PBFlushFileAsync + +# #### + +- dispatcher: + name: FSDispatch + trap: 0xA060 + selector-location: D0W + +# #### + +- function: + name: PBOpenWD + return: OSErr + args: + - name: pb + type: WDPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x0001 + returnreg: D0 + variants: + - PBOpenWDSync + - PBOpenWDAsync + +# #### + +- function: + name: PBCloseWD + return: OSErr + args: + - name: pb + type: WDPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x0002 + returnreg: D0 + variants: + - PBCloseWDSync + - PBCloseWDAsync + +# #### + +- function: + name: PBCatMove + return: OSErr + args: + - name: pb + type: CMovePBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x0005 + returnreg: D0 + variants: + - PBCatMoveSync + - PBCatMoveAsync + +# #### + +- function: + name: PBDirCreate + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x0006 + returnreg: D0 + variants: + - PBDirCreateSync + - PBDirCreateAsync + +# #### + +- function: + name: PBGetWDInfo + return: OSErr + args: + - name: pb + type: WDPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x0007 + returnreg: D0 + variants: + - PBGetWDInfoSync + - PBGetWDInfoAsync + +# #### + +- function: + name: PBGetFCBInfo + return: OSErr + args: + - name: pb + type: FCBPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x0008 + returnreg: D0 + variants: + - PBGetFCBInfoSync + - PBGetFCBInfoAsync + +# #### + +- function: + name: PBGetCatInfo + return: OSErr + args: + - name: pb + type: CInfoPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 9 + returnreg: D0 + variants: + - PBGetCatInfoSync + - PBGetCatInfoAsync + +# #### + +- function: + name: PBSetCatInfo + return: OSErr + args: + - name: pb + type: CInfoPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 10 + returnreg: D0 + variants: + - PBSetCatInfoSync + - PBSetCatInfoAsync + +# #### + +- function: + name: PBSetVInfo + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 11 + returnreg: D0 + variants: + - PBSetVInfoSync + - PBSetVInfoAsync + +# #### + +- function: + name: PBLockRange + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x10 + returnreg: D0 + variants: + - PBLockRangeSync + - PBLockRangeAsync + +# #### + +- function: + name: PBUnlockRange + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x11 + returnreg: D0 + variants: + - PBUnlockRangeSync + - PBUnlockRangeAsync + +# #### + +- function: + name: PBCreateFileIDRef + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x14 + returnreg: D0 + variants: + - PBCreateFileIDRefSync + - PBCreateFileIDRefAsync + +# #### + +- function: + name: PBDeleteFileIDRef + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x15 + returnreg: D0 + variants: + - PBDeleteFileIDRefSync + - PBDeleteFileIDRefAsync + +# #### + +- function: + name: PBResolveFileIDRef + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x16 + returnreg: D0 + variants: + - PBResolveFileIDRefSync + - PBResolveFileIDRefAsync + +# #### + +- function: + name: PBExchangeFiles + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x17 + returnreg: D0 + variants: + - PBExchangeFilesSync + - PBExchangeFilesAsync + +# #### + +- function: + name: PBCatSearch + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x18 + returnreg: D0 + variants: + - PBCatSearchSync + - PBCatSearchAsync + +# #### + +- function: + name: PBOpenDF + return: OSErr + args: + - name: pb + type: ParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: mfs + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x1A + returnreg: D0 + variants: + - PBOpenDFSync + - PBOpenDFAsync + +# #### + +- function: + name: PBHOpenDF + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: hfs + trap: 41568 + dispatcher: FSDispatch + selector: 0x1A + returnreg: D0 + variants: + - PBHOpenDFSync + - PBHOpenDFAsync + +# #### + +- function: + name: PBHGetVolParms + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x30 + returnreg: D0 + variants: + - PBHGetVolParmsSync + - PBHGetVolParmsAsync + +# #### + +- function: + name: PBHGetLogInInfo + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x31 + returnreg: D0 + variants: + - PBHGetLogInInfoSync + - PBHGetLogInInfoAsync + +# #### + +- function: + name: PBHGetDirAccess + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x32 + returnreg: D0 + variants: + - PBHGetDirAccessSync + - PBHGetDirAccessAsync + +# #### + +- function: + name: PBHSetDirAccess + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x33 + returnreg: D0 + variants: + - PBHSetDirAccessSync + - PBHSetDirAccessAsync + +# #### + +- function: + name: PBHMapID + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x34 + returnreg: D0 + variants: + - PBHMapIDSync + - PBHMapIDAsync + +# #### + +- function: + name: PBHMapName + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x35 + returnreg: D0 + variants: + - PBHMapNameSync + - PBHMapNameAsync + +# #### + +- function: + name: PBHCopyFile + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x36 + returnreg: D0 + variants: + - PBHCopyFileSync + - PBHCopyFileAsync + +# #### + +- function: + name: PBHMoveRename + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x37 + returnreg: D0 + variants: + - PBHMoveRenameSync + - PBHMoveRenameAsync + +# #### + +- function: + name: PBHOpenDeny + return: OSErr + args: + - name: pb + type: HParmBlkPtr + register: A0 + - name: a + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x38 + returnreg: D0 + variants: + - PBHOpenDenySync + - PBHOpenDenyAsync + +# #### + +- dispatcher: + name: HighLevelFSDispatch + trap: 0xAA52 + selector-location: D0<0xF> + comment: | + prototypes for the high level filesystem dispatch traps + +# #### + +- function: + name: FSMakeFSSpec + return: OSErr + args: + - name: vRefNum + type: int16_t + - name: dir_id + type: int32_t + - name: file_name + type: ConstStringPtr + - name: spec + type: FSSpecPtr + dispatcher: HighLevelFSDispatch + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: FSpExchangeFiles + return: OSErr + args: + - name: src + type: FSSpecPtr + - name: dst + type: FSSpecPtr + dispatcher: HighLevelFSDispatch + selector: 0x000F + executor: C_ + +# #### + +- function: + name: FSpOpenDF + return: OSErr + args: + - name: spec + type: FSSpecPtr + - name: perms + type: SignedByte + - name: refNum_out + type: int16_t* + dispatcher: HighLevelFSDispatch + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: FSpOpenRF + return: OSErr + args: + - name: spec + type: FSSpecPtr + - name: perms + type: SignedByte + - name: refNum_out + type: int16_t* + dispatcher: HighLevelFSDispatch + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: FSpCreate + return: OSErr + args: + - name: spec + type: FSSpecPtr + - name: creator + type: OSType + - name: file_type + type: OSType + - name: script + type: ScriptCode + dispatcher: HighLevelFSDispatch + selector: 0x0004 + executor: C_ + +# #### + +- function: + name: FSpDirCreate + return: OSErr + args: + - name: spec + type: FSSpecPtr + - name: script + type: ScriptCode + - name: created_dir_id + type: int32_t* + dispatcher: HighLevelFSDispatch + selector: 0x0005 + executor: C_ + +# #### + +- function: + name: FSpDelete + return: OSErr + args: + - name: spec + type: FSSpecPtr + dispatcher: HighLevelFSDispatch + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: FSpGetFInfo + return: OSErr + args: + - name: spec + type: FSSpecPtr + - name: fndr_info + type: FInfo* + dispatcher: HighLevelFSDispatch + selector: 0x0007 + executor: C_ + +# #### + +- function: + name: FSpSetFInfo + return: OSErr + args: + - name: spec + type: FSSpecPtr + - name: fndr_info + type: FInfo* + dispatcher: HighLevelFSDispatch + selector: 0x0008 + executor: C_ + +# #### + +- function: + name: FSpSetFLock + return: OSErr + args: + - name: spec + type: FSSpecPtr + dispatcher: HighLevelFSDispatch + selector: 0x0009 + executor: C_ + +# #### + +- function: + name: FSpRstFLock + return: OSErr + args: + - name: spec + type: FSSpecPtr + dispatcher: HighLevelFSDispatch + selector: 0x000A + executor: C_ + +# #### + +- function: + name: FSpRename + return: OSErr + args: + - name: spec + type: FSSpecPtr + - name: new_name + type: ConstStringPtr + dispatcher: HighLevelFSDispatch + selector: 0x000B + executor: C_ + +# #### + +- function: + name: FSpCatMove + return: OSErr + args: + - name: src + type: FSSpecPtr + - name: dst + type: FSSpecPtr + dispatcher: HighLevelFSDispatch + selector: 0x000C + executor: C_ + +# #### + +- function: + name: FSpCreateResFile + args: + - name: spec + type: FSSpecPtr + - name: creator + type: OSType + - name: file_type + type: OSType + - name: script + type: ScriptCode + dispatcher: HighLevelFSDispatch + selector: 0x000E + executor: C_ + +# #### + +- function: + name: FSpOpenResFile + return: INTEGER + args: + - name: spec + type: FSSpecPtr + - name: perms + type: SignedByte + dispatcher: HighLevelFSDispatch + selector: 0x000D + executor: C_ + +# #### + +- function: + name: HOpenResFile + return: INTEGER + args: + - name: vref + type: INTEGER + - name: dirid + type: LONGINT + - name: file_name + type: ConstStringPtr + - name: perm + type: SignedByte + trap: 0xA81A + executor: C_ + +# #### + +- function: + name: HCreateResFile + args: + - name: vrefnum + type: INTEGER + - name: parid + type: LONGINT + - name: name + type: ConstStringPtr + trap: 0xA81B + executor: C_ + +# #### + +- function: + name: HCreate + return: OSErr + args: + - name: vref + type: INTEGER + - name: dirid + type: LONGINT + - name: name + type: ConstStringPtr + - name: creator + type: OSType + - name: type + type: OSType + executor: true + +# #### + +- function: + name: HOpenRF + return: OSErr + args: + - name: vref + type: INTEGER + - name: dirid + type: LONGINT + - name: name + type: ConstStringPtr + - name: perm + type: SignedByte + - name: refp + type: INTEGER* + executor: true + +# #### + +- function: + name: HOpen + return: OSErr + args: + - name: vref + type: INTEGER + - name: dirid + type: LONGINT + - name: name + type: ConstStringPtr + - name: perm + type: SignedByte + - name: refp + type: INTEGER* + executor: true + +# #### + +- function: + name: HOpenDF + return: OSErr + args: + - name: vref + type: INTEGER + - name: dirid + type: LONGINT + - name: name + type: ConstStringPtr + - name: perm + type: SignedByte + - name: refp + type: INTEGER* + executor: true + +# #### + +- function: + name: HRename + return: OSErr + args: + - name: vref + type: INTEGER + - name: dirid + type: LONGINT + - name: src + type: ConstStringPtr + - name: dst + type: ConstStringPtr + +# #### + +- function: + name: HDelete + return: OSErr + args: + - name: vref + type: INTEGER + - name: dirid + type: LONGINT + - name: name + type: ConstStringPtr + comment: | + NOTRAP_FUNCTION2(HRename); + +# #### + +- function: + name: GetWDInfo + return: OSErr + args: + - name: wd + type: INTEGER + - name: vrefp + type: INTEGER* + - name: dirp + type: LONGINT* + - name: procp + type: LONGINT* + comment: | + NOTRAP_FUNCTION2(HDelete); + +# #### + +- common: + name: COMMONFSQUEUEDEFS + members: + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: ioTrap + type: INTEGER + - name: ioCmdAddr + type: Ptr + - name: ioCompletion + type: ProcPtr + - name: ioResult + type: OSErr + - name: ioNamePtr + type: StringPtr + - name: ioVRefNum + type: INTEGER + +# #### + +- common: + name: COMMONCINFODEFS + members: + - common: COMMONFSQUEUEDEFS + - name: ioFRefNum + type: INTEGER + - name: ioFVersNum + type: SignedByte + - name: filler1 + type: SignedByte + - name: ioFDirIndex + type: INTEGER + - name: ioFlAttrib + type: SignedByte + - name: ioACUser + type: SignedByte diff --git a/defs/Finder.yaml b/defs/Finder.yaml new file mode 100644 index 0000000..58c7c07 --- /dev/null +++ b/defs/Finder.yaml @@ -0,0 +1,394 @@ +- struct: + name: DTPBRec + members: + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: ioTrap + type: INTEGER + - name: ioCmdAddr + type: Ptr + - name: ioCompletion + type: ProcPtr + - name: ioResult + type: OSErr + - name: ioNamePtr + type: StringPtr + - name: ioVRefNum + type: INTEGER + - name: ioDTRefNum + type: INTEGER + - name: ioIndex + type: INTEGER + - name: ioTagInfo + type: LONGINT + - name: ioDTBuffer + type: Ptr + - name: ioDTReqCount + type: LONGINT + - name: ioDTActCount + type: LONGINT + - name: filler1 + type: SignedByte + - name: ioIconType + type: SignedByte + - name: filler2 + type: INTEGER + - name: ioDirID + type: LONGINT + - name: ioFileCreator + type: OSType + - name: ioFileType + type: OSType + - name: ioFiller3 + type: LONGINT + - name: ioDTLgLen + type: LONGINT + - name: ioDTPyLen + type: LONGINT + - name: ioFiller4 + type: INTEGER[14] + - name: ioAPPLParID + type: LONGINT + size: 104 + +# #### + +- typedef: + name: DTPBRecPtr + type: DTPBRec* + +# #### + +- typedef: + name: DTPBPtr + type: DTPBRec* + +# #### + +- function: + name: PBDTGetPath + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + executor: true + dispatcher: FSDispatch + selector: 0x20 + returnreg: D0 + +# #### + +- function: + name: PBDTCloseDown + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + executor: true + dispatcher: FSDispatch + selector: 0x21 + returnreg: D0 + +# #### + +- function: + name: PBDTAddIcon + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x22 + returnreg: D0 + variants: + - PBDTAddIconSync + - PBDTAddIconAsync + +# #### + +- function: + name: PBDTGetIcon + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x23 + returnreg: D0 + variants: + - PBDTGetIconSync + - PBDTGetIconAsync + +# #### + +- function: + name: PBDTGetIconInfo + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x24 + returnreg: D0 + variants: + - PBDTGetIconInfoSync + - PBDTGetIconInfoAsync + +# #### + +- function: + name: PBDTAddAPPL + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x25 + returnreg: D0 + variants: + - PBDTAddAPPLSync + - PBDTAddAPPLAsync + +# #### + +- function: + name: PBDTRemoveAPPL + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x26 + returnreg: D0 + variants: + - PBDTRemoveAPPLSync + - PBDTRemoveAPPLAsync + +# #### + +- function: + name: PBDTGetAPPL + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x27 + returnreg: D0 + variants: + - PBDTGetAPPLSync + - PBDTGetAPPLAsync + +# #### + +- function: + name: PBDTSetComment + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x28 + returnreg: D0 + variants: + - PBDTSetCommentSync + - PBDTSetCommentAsync + +# #### + +- function: + name: PBDTRemoveComment + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x29 + returnreg: D0 + variants: + - PBDTRemoveCommentSync + - PBDTRemoveCommentAsync + +# #### + +- function: + name: PBDTGetComment + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x2A + returnreg: D0 + variants: + - PBDTGetCommentSync + - PBDTGetCommentAsync + +# #### + +- function: + name: PBDTFlush + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x2B + returnreg: D0 + variants: + - PBDTFlushSync + - PBDTFlushAsync + +# #### + +- function: + name: PBDTReset + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x2C + returnreg: D0 + variants: + - PBDTResetSync + - PBDTResetAsync + +# #### + +- function: + name: PBDTGetInfo + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x2D + returnreg: D0 + variants: + - PBDTGetInfoSync + - PBDTGetInfoAsync + +# #### + +- function: + name: PBDTOpenInform + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + executor: true + dispatcher: FSDispatch + selector: 0x2E + returnreg: D0 + +# #### + +- function: + name: PBDTDelete + return: OSErr + args: + - name: dtp + type: DTPBPtr + register: A0 + - name: async + type: Boolean + register: TrapBit<0x400> + executor: true + file_trap: true + trap: 0xA260 + dispatcher: FSDispatch + selector: 0x2F + returnreg: D0 + variants: + - PBDTDeleteSync + - PBDTDeleteAsync diff --git a/defs/FontMgr.yaml b/defs/FontMgr.yaml new file mode 100644 index 0000000..32ae0e3 --- /dev/null +++ b/defs/FontMgr.yaml @@ -0,0 +1,720 @@ +- enum: + values: + - name: systemFont + value: 0 + - name: applFont + value: 1 + - name: newYork + value: 2 + - name: geneva + value: 3 + - name: monaco + value: 4 + - name: venice + value: 5 + - name: london + value: 6 + - name: athens + value: 7 + - name: sanFran + value: 8 + - name: toronto + value: 9 + - name: cairo + value: 11 + - name: losAngeles + value: 12 + - name: times + value: 20 + +# #### + +- enum: + values: + - name: helvetica + value: 21 + - name: courier + value: 22 + - name: symbol + value: 23 + - name: taliesin + value: 24 + +# #### + +- enum: + values: + - name: kFontIDNewYork + value: newYork + - name: kFontIDGeneva + value: geneva + - name: kFontIDMonaco + value: monaco + - name: kFontIDVenice + value: venice + - name: kFontIDLondon + value: london + - name: kFontIDAthens + value: athens + - name: kFontIDSanFrancisco + value: sanFran + - name: kFontIDToronto + value: toronto + - name: kFontIDCairo + value: cairo + - name: kFontIDLosAngeles + value: losAngeles + - name: kFontIDTimes + value: times + - name: kFontIDHelvetica + value: helvetica + - name: kFontIDCourier + value: courier + - name: kFontIDSymbol + value: symbol + - name: kFontIDTaliesin + value: taliesin + +# #### + +- enum: + values: + - name: commandMark + value: 0x11 + - name: checkMark + value: 0x12 + - name: diamondMark + value: 0x13 + - name: appleMark + value: 0x14 + +# #### + +- enum: + values: + - name: propFont + value: 0x9000 + - name: prpFntH + value: 0x9001 + - name: prpFntW + value: 0x9002 + - name: prpFntHW + value: 0x9003 + +# #### + +- enum: + values: + - name: fixedFont + value: 0xB000 + - name: fxdFntH + value: 0xB001 + - name: fxdFntW + value: 0xB002 + - name: fxdFntHW + value: 0xB003 + +# #### + +- enum: + values: + - name: fontWid + value: 0xACB0 + +# #### + +- struct: + name: FMetricRec + members: + - name: ascent + type: Fixed + - name: descent + type: Fixed + - name: leading + type: Fixed + - name: widMax + type: Fixed + - name: wTabHandle + type: Handle + size: 20 + +# #### + +- struct: + name: FamRec + members: + - name: ffFlags + type: INTEGER + - name: ffFamID + type: INTEGER + - name: ffFirstChar + type: INTEGER + - name: ffLastChar + type: INTEGER + - name: ffAscent + type: INTEGER + - name: ffDescent + type: INTEGER + - name: ffLeading + type: INTEGER + - name: ffWidMax + type: INTEGER + - name: ffWTabOff + type: LONGINT + - name: ffKernOff + type: LONGINT + - name: ffStylOff + type: LONGINT + - name: ffProperty + type: INTEGER[9] + - name: ffIntl + type: INTEGER[2] + - name: ffVersion + type: INTEGER + comment: | + FontAssoc ffAssoc; + WidTable ffWidthTab; + StyleTable ffStyTab; + KernTable ffKernTab; + size: 52 + +# #### + +- struct: + name: WidthTable + members: + - name: tabData + type: Fixed[256] + - name: tabFont + type: Handle + - name: sExtra + type: LONGINT + - name: style + type: LONGINT + - name: fID + type: INTEGER + - name: fSize + type: INTEGER + - name: face + type: INTEGER + - name: device + type: INTEGER + - name: inNumer + type: Point + - name: inDenom + type: Point + - name: aFID + type: INTEGER + - name: fHand + type: Handle + - name: usedFam + type: Boolean + - name: aFace + type: Byte + - name: vOutput + type: INTEGER + - name: hOutput + type: INTEGER + - name: vFactor + type: INTEGER + - name: hFactor + type: INTEGER + - name: aSize + type: INTEGER + - name: tabSize + type: INTEGER + size: 1072 + +# #### + +- struct: + name: FMInput + members: + - name: family + type: INTEGER + - name: size + type: INTEGER + - name: face + type: Style + - name: needBits + type: Boolean + - name: device + type: INTEGER + - name: numer + type: Point + - name: denom + type: Point + size: 16 + +# #### + +- struct: + name: FMOutput + members: + - name: errNum + type: INTEGER + comment: | + 0x00 + - name: fontHandle + type: Handle + comment: | + 0x02 + - name: bold + type: Byte + comment: | + 0x06 + - name: italic + type: Byte + comment: | + 0x07 + - name: ulOffset + type: Byte + comment: | + 0x08 + - name: ulShadow + type: Byte + comment: | + 0x09 + - name: ulThick + type: Byte + comment: | + 0x0A + - name: shadow + type: Byte + comment: | + 0x0B + - name: extra + type: SignedByte + comment: | + 0x0C + - name: ascent + type: Byte + comment: | + 0x0D + - name: descent + type: Byte + comment: | + 0x0E + - name: widMax + type: Byte + comment: | + 0x0F + - name: leading + type: SignedByte + comment: | + 0x10 + - name: unused + type: Byte + comment: | + 0x11 + - name: numer + type: Point + comment: | + 0x12 + - name: denom + type: Point + comment: | + 0x16 + size: 26 + +# #### + +- typedef: + name: FMOutPtr + type: FMOutput* + +# #### + +- struct: + name: FontRec + members: + - name: fontType + type: INTEGER + - name: firstChar + type: INTEGER + - name: lastChar + type: INTEGER + - name: widMax + type: INTEGER + - name: kernMax + type: INTEGER + - name: nDescent + type: INTEGER + - name: fRectWidth + type: INTEGER + - name: fRectHeight + type: INTEGER + - name: owTLoc + type: INTEGER + - name: ascent + type: INTEGER + - name: descent + type: INTEGER + - name: leading + type: INTEGER + - name: rowWords + type: INTEGER + comment: | + more stuff is usually appended here ... bitImage, locTable, owTable + size: 26 + +# #### + +- typedef: + name: FamRecPtr + type: FamRec* + +# #### + +- typedef: + name: FamRecHandle + type: FamRecPtr* + +# #### + +- typedef: + name: WidthTablePtr + type: WidthTable* + +# #### + +- typedef: + name: WidthTableHandle + type: WidthTablePtr* + +# #### + +- lowmem: + name: JSwapFont + type: ProcPtr + address: 0x8E0 + comment: | + FontMgr Private.a (true-b); + +# #### + +- lowmem: + name: WidthListHand + type: Handle + address: 0x8E4 + comment: | + FontMgr IMIV-42 (true); + +# #### + +- lowmem: + name: ROMFont0 + type: Handle + address: 0x980 + comment: | + FontMgr IMI-233 (true); + +# #### + +- lowmem: + name: ApFontID + type: INTEGER + address: 0x984 + comment: | + FontMgr IMIV-31 (true); + +# #### + +- lowmem: + name: ROMlib_myfmi + type: FMInput + address: 0x988 + comment: | + FontMgr ToolEqu.a (true); + +# #### + +- lowmem: + name: ROMlib_fmo + type: FMOutput + address: 0x998 + comment: | + FontMgr Private.a (true); + +# #### + +- lowmem: + name: FScaleDisable + type: Byte + address: 0xA63 + comment: | + FontMgr IMI-222 (true); + +# #### + +- lowmem: + name: WidthPtr + type: WidthTablePtr + address: 0xB10 + comment: | + FontMgr IMIV-42 (true); + +# #### + +- lowmem: + name: WidthTabHandle + type: WidthTableHandle + address: 0xB2A + comment: | + FontMgr IMIV-42 (true); + +# #### + +- lowmem: + name: IntlSpec + type: LONGINT + address: 0xBA0 + comment: | + FontMgr IMIV-42 (true); + +# #### + +- lowmem: + name: SysFontFam + type: INTEGER + address: 0xBA6 + comment: | + FontMgr IMIV-31 (true); + +# #### + +- lowmem: + name: SysFontSiz + type: INTEGER + address: 0xBA8 + comment: | + FontMgr IMIV-31 (true); + +# #### + +- lowmem: + name: LastFOND + type: FamRecHandle + address: 0xBC2 + comment: | + FontMgr IMIV-36 (true); + +# #### + +- lowmem: + name: fondid + type: INTEGER + address: 0xBC6 + comment: | + FontMgr ToolEqu.a (true-b); + +# #### + +- lowmem: + name: FractEnable + type: Byte + address: 0xBF4 + comment: | + FontMgr IMIV-32 (true); + +# #### + +- lowmem: + name: SynListHandle + type: Handle + address: 0xD32 + comment: | + FontMgr IMV-182 (false); + +# #### + +- dispatcher: + name: FontDispatch + trap: 0xA854 + selector-location: D0<0xF> + +# #### + +- function: + name: InitFonts + trap: 0xA8FE + executor: C_ + +# #### + +- function: + name: GetFontName + args: + - name: fnum + type: INTEGER + - name: fnam + type: StringPtr + trap: 0xA8FF + executor: C_ + +# #### + +- function: + name: GetFNum + args: + - name: fnam + type: ConstStringPtr + - name: fnum + type: INTEGER* + trap: 0xA900 + executor: C_ + +# #### + +- function: + name: RealFont + return: Boolean + args: + - name: fnum + type: INTEGER + - name: sz + type: INTEGER + trap: 0xA902 + executor: C_ + +# #### + +- function: + name: SetFontLock + args: + - name: lflag + type: Boolean + trap: 0xA903 + executor: C_ + +# #### + +- function: + name: FMSwapFont + return: FMOutPtr + args: + - name: fmip + type: FMInput* + trap: 0xA901 + executor: C_ + +# #### + +- function: + name: FontMetrics + args: + - name: metrp + type: FMetricRec* + trap: 0xA835 + executor: C_ + +# #### + +- function: + name: SetFScaleDisable + args: + - name: disable + type: Boolean + trap: 0xA834 + executor: C_ + +# #### + +- function: + name: SetFractEnable + args: + - name: enable + type: Boolean + trap: 0xA814 + executor: C_ + +# #### + +- function: + name: SetOutlinePreferred + args: + - name: _outline_perferred_p + type: Boolean + dispatcher: FontDispatch + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: GetOutlinePreferred + return: Boolean + dispatcher: FontDispatch + selector: 0x0009 + executor: C_ + +# #### + +- function: + name: IsOutline + return: Boolean + args: + - name: numer + type: Point + - name: denom + type: Point + dispatcher: FontDispatch + selector: 0x0000 + executor: C_ + +# #### + +- function: + name: OutlineMetrics + return: OSErr + args: + - name: byte_count + type: int16_t + - name: text + type: Ptr + - name: numer + type: Point + - name: denom + type: Point + - name: y_max + type: int16_t* + - name: y_min + type: int16_t* + - name: aw_array + type: Fixed* + - name: lsb_array + type: Fixed* + - name: bounds_array + type: Rect* + dispatcher: FontDispatch + selector: 0x0008 + executor: C_ + +# #### + +- function: + name: SetPreserveGlyph + args: + - name: preserve_glyph + type: Boolean + dispatcher: FontDispatch + selector: 0x000A + executor: C_ + +# #### + +- function: + name: GetPreserveGlyph + return: Boolean + dispatcher: FontDispatch + selector: 0x000B + executor: C_ + +# #### + +- function: + name: FlushFonts + return: OSErr + dispatcher: FontDispatch + selector: 0x000C + executor: C_ diff --git a/defs/Gestalt.yaml b/defs/Gestalt.yaml new file mode 100644 index 0000000..eefda32 --- /dev/null +++ b/defs/Gestalt.yaml @@ -0,0 +1,430 @@ +- enum: + values: + - name: gestaltPhysicalRAMSize + value: "'ram '" + - name: gestaltAddressingModeAttr + value: "'addr'" + - name: gestaltAliasMgrAttr + value: "'alis'" + - name: gestaltAppleEventsAttr + value: "'evnt'" + - name: gestaltAppleTalkVersion + value: "'atlk'" + - name: gestaltAUXVersion + value: "'a/ux'" + - name: gestaltConnMgrAttr + value: "'conn'" + - name: gestaltCRMAttr + value: "'crm '" + - name: gestaltCTBVersion + value: "'ctbv'" + - name: gestaltDBAccessMgrAttr + value: "'dbac'" + - name: gestaltDITLExtAttr + value: "'ditl'" + - name: gestaltEasyAccessAttr + value: "'easy'" + - name: gestaltEditionMgrAttr + value: "'edtn'" + - name: gestaltExtToolboxTable + value: "'xttt'" + - name: gestaltFindFolderAttr + value: "'fold'" + - name: gestaltFontMgrAttr + value: "'font'" + - name: gestaltFPUType + value: "'fpu '" + - name: gestaltFSAttr + value: "'fs '" + - name: gestaltFXfrMgrAttr + value: "'fxfr'" + - name: gestaltHardwareAttr + value: "'hdwr'" + - name: gestaltHelpMgrAttr + value: "'help'" + - name: gestaltIconUtilitiesAttr + value: "'icon'" + - name: gestaltKeyboardType + value: "'kbd '" + - name: gestaltLogicalPageSize + value: "'pgsz'" + - name: gestaltLogicalRAMSize + value: "'lram'" + - name: gestaltLowMemorySize + value: "'lmem'" + - name: gestaltMiscAttr + value: "'misc'" + - name: gestaltMMUType + value: "'mmu '" + - name: gestaltNotificatinMgrAttr + value: "'nmgr'" + - name: gestaltNuBusConnectors + value: "'sltc'" + - name: gestaltOSAttr + value: "'os '" + - name: gestaltOSTable + value: "'ostt'" + - name: gestaltParityAttr + value: "'prty'" + - name: gestaltPopupAttr + value: "'pop!'" + - name: gestaltPowerMgrAttr + value: "'powr'" + - name: gestaltPPCToolboxAttr + value: "'ppc '" + - name: gestaltProcessorType + value: "'proc'" + - name: gestaltQuickdrawVersion + value: "'qd '" + - name: gestaltQuickdrawFeatures + value: "'qdrw'" + - name: gestaltResourceMgrAttr + value: "'rsrc'" + - name: gestaltScriptCount + value: "'scr#'" + - name: gestaltScriptMgrVersion + value: "'scri'" + - name: gestaltSoundAttr + value: "'snd '" + - name: gestaltSpeechAttr + value: "'ttsc'" + - name: gestaltStandardFileAttr + value: "'stdf'" + - name: gestaltStdNBPAttr + value: "'nlup'" + - name: gestaltTermMgrAttr + value: "'term'" + - name: gestaltTextEditVersion + value: "'te '" + - name: gestaltTimeMgrVersion + value: "'tmgr'" + - name: gestaltToolboxTable + value: "'tbbt'" + - name: gestaltVersion + value: "'vers'" + - name: gestaltVMAttr + value: "'vm '" + - name: gestaltMachineIcon + value: "'micn'" + - name: gestaltMachineType + value: "'mach'" + - name: gestaltROMSize + value: "'rom '" + - name: gestaltROMVersion + value: "'romv'" + - name: gestaltSystemVersion + value: "'sysv'" + - name: gestaltNativeCPUtype + value: "'cput'" + - name: gestaltSysArchitecture + value: "'sysa'" + +# #### + +- enum: + values: + - name: gestaltMacQuadra610 + value: 53 + - name: gestaltCPU68040 + value: 4 + - name: gestaltCPU601 + value: 0x101 + - name: gestaltCPU603 + value: 0x103 + - name: gestaltCPU604 + value: 0x104 + - name: gestaltCPU603e + value: 0x106 + - name: gestaltCPU603ev + value: 0x107 + - name: gestaltCPU750 + value: 0x108 + comment: | + G3 + - name: gestaltCPU604e + value: 0x109 + - name: gestaltCPU604ev + value: 0x10A + - name: gestaltCPUG4 + value: 0x10C + comment: | + determined by running test app on Sybil + - name: gestaltNoMMU + value: 0 + - name: gestalt68k + value: 1 + - name: gestaltPowerPC + value: 2 + +# #### + +- enum: + values: + - name: gestalt32BitAddressing + value: 0 + - name: gestalt32BitSysZone + value: 1 + - name: gestalt32BitCapable + value: 2 + +# #### + +- enum: + values: + - name: gestaltHasVIA1 + value: 0 + - name: gestaltHasVIA2 + value: 1 + - name: gestaltHasASC + value: 3 + - name: gestaltHasSSC + value: 4 + - name: gestaltHasSCI + value: 7 + comment: | + gestaltHardwareAttr return values + +# #### + +- enum: + values: + - name: gestaltEasyAccessOff + value: 1 << 0 + - name: gestalt68881 + value: 1 + - name: gestaltMacKbd + value: 1 + - name: gestalt68040MMu + value: 4 + - name: gestalt68000 + value: 1 + - name: gestalt68040 + value: 5 + +# #### + +- enum: + values: + - name: gestaltOriginalQD + value: 0 + - name: gestalt8BitQD + value: 0x0100 + - name: gestalt32BitQD + value: 0x0200 + - name: gestalt32BitQD11 + value: 0x0210 + - name: gestalt32BitQD12 + value: 0x0220 + - name: gestalt32BitQD13 + value: 0x0230 + +# #### + +- enum: + values: + - name: gestaltHasColor + value: 0 + - name: gestaltHasDeepGWorlds + value: 1 + - name: gestaltHasDirectPixMaps + value: 2 + - name: gestaltHasGrayishTextOr + value: 3 + +# #### + +- enum: + values: + - name: gestaltTE1 + value: 1 + - name: gestaltTE2 + value: 2 + - name: gestaltTE3 + value: 3 + - name: gestaltTE4 + value: 4 + - name: gestaltTE5 + value: 5 + +# #### + +- enum: + values: + - name: gestaltDITLExtPresent + value: 0 + +# #### + +- enum: + values: + - name: gestaltStandardTimeMgr + value: 1 + - name: gestaltVMPresent + value: 1 << 0 + +# #### + +- enum: + values: + - name: gestaltClassic + value: 1 + - name: gestaltMacXL + value: 2 + - name: gestaltMac512KE + value: 3 + - name: gestaltMacPlus + value: 4 + - name: gestaltMacSE + value: 5 + - name: gestaltMacII + value: 6 + - name: gestaltMacIIx + value: 7 + - name: gestaltMacIIcx + value: 8 + - name: gestaltMacSE30 + value: 9 + - name: gestaltPortable + value: 10 + - name: gestaltMacIIci + value: 11 + - name: gestaltMacIIfx + value: 13 + - name: gestaltMacClassic + value: 17 + - name: gestaltMacIIsi + value: 18 + - name: gestaltMacLC + value: 19 + +# #### + +- enum: + values: + - name: gestaltHasFSSpecCalls + value: 1 << 1 + +# #### + +- enum: + values: + - name: gestaltStandardFile58 + value: 1 << 0 + +# #### + +- enum: + values: + - name: gestaltUndefSelectorErr + value: -5551 + - name: gestaltUnknownErr + value: -5550 + - name: gestaltDupSelectorErr + value: -5552 + - name: gestaltLocationErr + value: -5553 + +# #### + +- enum: + values: + - name: gestaltSerialAttr + value: "'ser '" + - name: gestaltHasGPIaToDCDa + value: 0 + - name: gestaltHasGPIaToRTxCa + value: 1 + - name: gestaltHasGPIbToDCDb + value: 2 + - name: gestaltHidePortA + value: 3 + - name: gestaltHidePortB + value: 4 + - name: gestaltPortADisabled + value: 5 + - name: gestaltPortBDisabled + value: 6 + +# #### + +- enum: + values: + - name: gestaltOpenTpt + value: "'otan'" + +# #### + +- funptr: + return: OSErr + args: + - type: OSType + - type: LONGINT* + name: SelectorFunctionUPP + +# #### + +- dispatcher: + name: GestaltDispatch + trap: 0xA1AD + selector-location: TrapBits + +# #### + +- enum: + values: + - name: _Gestalt + value: 0xA1AD + +# #### + +- function: + name: Gestalt + return: OSErr + args: + - name: selector + type: OSType + register: D0 + - name: responsep + type: LONGINT* + register: Out + executor: C_ + dispatcher: GestaltDispatch + selector: 0x000 + returnreg: D0 + +# #### + +- function: + name: NewGestalt + return: OSErr + args: + - name: selector + type: OSType + register: D0 + - name: selFunc + type: SelectorFunctionUPP + register: A0 + executor: C_ + dispatcher: GestaltDispatch + selector: 0x200 + returnreg: D0 + +# #### + +- function: + name: ReplaceGestalt + return: OSErr + args: + - name: selector + type: OSType + register: D0 + - name: selFunc + type: SelectorFunctionUPP + register: A0 + - name: oldSelFuncp + type: SelectorFunctionUPP* + register: Out + executor: C_ + dispatcher: GestaltDispatch + selector: 0x400 + returnreg: D0 diff --git a/defs/HelpMgr.yaml b/defs/HelpMgr.yaml new file mode 100644 index 0000000..36f5109 --- /dev/null +++ b/defs/HelpMgr.yaml @@ -0,0 +1,384 @@ +- struct: + name: HMStringResType + members: + - name: hmmResID + type: INTEGER + - name: hmmIndex + type: INTEGER + size: 4 + +# #### + +- struct: + name: HMMessageRecord + members: + - name: hmmHelpType + type: INTEGER + - name: u + union: + - name: hmmString + type: Str255 + - name: hmmPict + type: INTEGER + - name: hmmStringRes + type: HMStringResType + - name: hmmTEHandle + type: TEHandle + - name: hmmPictHandle + type: PicHandle + - name: hmmTERes + type: INTEGER + - name: hmmSTRRes + type: INTEGER + size: 258 + +# #### + +- typedef: + name: HMMessageRecPtr + type: HMMessageRecord* + +# #### + +- enum: + values: + - name: hmHelpDisabled + value: -850 + - name: hmBalloonAborted + value: -853 + - name: hmSameAsLastBalloon + value: -854 + - name: hmHelpManagerNotInited + value: -855 + - name: hmSkippedBalloon + value: -857 + - name: hmWrongVersion + value: -858 + - name: hmUnknownHelpType + value: -859 + - name: hmOperationUnsupported + value: -861 + - name: hmNoBalloonUp + value: -862 + - name: hmCloseViewActive + value: -863 + +# #### + +- dispatcher: + name: Pack14 + trap: 0xA830 + selector-location: D0W + comment: | + & 0xFF ? ### + +# #### + +- function: + name: HMGetBalloons + return: Boolean + dispatcher: Pack14 + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: HMSetBalloons + return: OSErr + args: + - name: flag + type: Boolean + dispatcher: Pack14 + selector: 0x0104 + executor: C_ + +# #### + +- function: + name: HMIsBalloon + return: Boolean + dispatcher: Pack14 + selector: 0x0007 + executor: C_ + +# #### + +- function: + name: HMShowBalloon + return: OSErr + args: + - name: msgp + type: HMMessageRecord* + - name: tip + type: Point + - name: alternaterectp + type: RectPtr + - name: tipprocptr + type: Ptr + - name: proc + type: INTEGER + - name: variant + type: INTEGER + - name: method + type: INTEGER + dispatcher: Pack14 + selector: 0x0B01 + executor: C_ + +# #### + +- function: + name: HMShowMenuBalloon + return: OSErr + args: + - name: item + type: INTEGER + - name: menuid + type: INTEGER + - name: flags + type: LONGINT + - name: itemreserved + type: LONGINT + - name: tip + type: Point + - name: alternaterectp + type: RectPtr + - name: tipproc + type: Ptr + - name: proc + type: INTEGER + - name: variant + type: INTEGER + dispatcher: Pack14 + selector: 0x0E05 + executor: C_ + +# #### + +- function: + name: HMRemoveBalloon + return: OSErr + dispatcher: Pack14 + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: HMGetHelpMenuHandle + return: OSErr + args: + - name: mhp + type: MenuHandle* + dispatcher: Pack14 + selector: 0x0200 + executor: C_ + +# #### + +- function: + name: HMGetFont + return: OSErr + args: + - name: fontp + type: INTEGER* + dispatcher: Pack14 + selector: 0x020A + executor: C_ + +# #### + +- function: + name: HMGetFontSize + return: OSErr + args: + - name: sizep + type: INTEGER* + dispatcher: Pack14 + selector: 0x020B + executor: C_ + +# #### + +- function: + name: HMSetFont + return: OSErr + args: + - name: font + type: INTEGER + dispatcher: Pack14 + selector: 0x0108 + executor: C_ + +# #### + +- function: + name: HMSetFontSize + return: OSErr + args: + - name: size + type: INTEGER + dispatcher: Pack14 + selector: 0x0109 + executor: C_ + +# #### + +- function: + name: HMSetDialogResID + return: OSErr + args: + - name: resid + type: INTEGER + dispatcher: Pack14 + selector: 0x010C + executor: C_ + +# #### + +- function: + name: HMGetDialogResID + return: OSErr + args: + - name: residp + type: INTEGER* + dispatcher: Pack14 + selector: 0x0213 + executor: C_ + +# #### + +- function: + name: HMSetMenuResID + return: OSErr + args: + - name: menuid + type: INTEGER + - name: resid + type: INTEGER + dispatcher: Pack14 + selector: 0x020D + executor: C_ + +# #### + +- function: + name: HMGetMenuResID + return: OSErr + args: + - name: menuidp + type: INTEGER* + - name: residp + type: INTEGER* + dispatcher: Pack14 + selector: 0x0314 + executor: C_ + +# #### + +- function: + name: HMScanTemplateItems + return: OSErr + args: + - name: whichid + type: INTEGER + - name: whicresfile + type: INTEGER + - name: whictype + type: ResType + dispatcher: Pack14 + selector: 0x0410 + executor: C_ + +# #### + +- function: + name: HMBalloonRect + return: OSErr + args: + - name: messp + type: HMMessageRecord* + - name: rectp + type: Rect* + dispatcher: Pack14 + selector: 0x040E + executor: C_ + +# #### + +- function: + name: HMBalloonPict + return: OSErr + args: + - name: messp + type: HMMessageRecord* + - name: pictp + type: PicHandle* + dispatcher: Pack14 + selector: 0x040F + executor: C_ + +# #### + +- function: + name: HMGetBalloonWindow + return: OSErr + args: + - name: windowpp + type: WindowPtr* + dispatcher: Pack14 + selector: 0x0215 + executor: C_ + +# #### + +- function: + name: HMExtractHelpMsg + return: OSErr + args: + - name: type + type: ResType + - name: resid + type: INTEGER + - name: msg + type: INTEGER + - name: state + type: INTEGER + - name: helpmsgp + type: HMMessageRecord* + dispatcher: Pack14 + selector: 0x0711 + executor: C_ + +# #### + +- function: + name: HMGetIndHelpMsg + return: OSErr + args: + - name: type + type: ResType + - name: resid + type: INTEGER + - name: msg + type: INTEGER + - name: state + type: INTEGER + - name: options + type: LONGINT* + - name: tip + type: Point + - name: altrectp + type: Rect* + - name: theprocp + type: INTEGER* + - name: variantp + type: INTEGER* + - name: helpmsgp + type: HMMessageRecord* + - name: count + type: INTEGER* + dispatcher: Pack14 + selector: 0x1306 + executor: C_ diff --git a/defs/Iconutil.yaml b/defs/Iconutil.yaml new file mode 100644 index 0000000..90bd487 --- /dev/null +++ b/defs/Iconutil.yaml @@ -0,0 +1,814 @@ +- enum: + values: + - name: large1BitMask + value: "'ICN#'" + - name: large4BitData + value: "'icl4'" + - name: large8BitData + value: "'icl8'" + - name: small1BitMask + value: "'ics#'" + - name: small4BitData + value: "'ics4'" + - name: small8BitData + value: "'ics8'" + - name: mini1BitMask + value: "'icm#'" + - name: mini4BitData + value: "'icm4'" + - name: mini8BitData + value: "'icm8'" + +# #### + +- enum: + values: + - name: atNone + value: 0 + - name: atVerticalCenter + value: 1 + - name: atTop + value: 2 + - name: atBottom + value: 3 + - name: atHorizontalCenter + value: 4 + - name: atAbsoluteCenter + value: atVerticalCenter | atHorizontalCenter + comment: | + 5 + - name: atCenterTop + value: atTop | atHorizontalCenter + comment: | + 6 + - name: atCenterBottom + value: atBottom | atHorizontalCenter + comment: | + 7 + - name: atLeft + value: 8 + - name: atCenterLeft + value: atVerticalCenter | atLeft + comment: | + 9 + - name: atTopLeft + value: atTop | atLeft + comment: | + 10 + - name: atBottomLeft + value: atBottom | atLeft + comment: | + 11 + - name: atRight + value: 12 + - name: atCenterRight + value: atVerticalCenter | atRight + comment: | + 13 + - name: atTopRight + value: atTop | atRight + comment: | + 14 + - name: atBottomRight + value: atBottom | atRight + comment: | + 15 + comment: | + IconAlignmentType values + +# #### + +- enum: + values: + - name: kAlignNode + value: 0 + - name: kAlignVerticalCenter + value: 1 + - name: kAlignTop + value: 2 + - name: kAlignBottom + value: 3 + - name: kAlignHorizontalCenter + value: 4 + - name: kAlignAbsoluteCenter + value: kAlignVerticalCenter | kAlignHorizontalCenter + comment: | + 5 + +# #### + +- enum: + values: + - name: ttNone + value: 0 + - name: ttDisabled + value: 1 + - name: ttOffline + value: 2 + - name: ttOpen + value: 3 + - name: ttLabel1 + value: 0x0100 + - name: ttLabel2 + value: 0x0200 + - name: ttLabel3 + value: 0x0300 + - name: ttLabel4 + value: 0x0400 + - name: ttLabel5 + value: 0x0500 + - name: ttLabel6 + value: 0x0600 + - name: ttLabel7 + value: 0x0700 + - name: ttSelected + value: 0x4000 + - name: ttSelectedDisabled + value: ttSelected | ttDisabled + - name: ttSelectedOffline + value: ttSelected | ttOffline + - name: ttSelectedOpen + value: ttSelected | ttOpen + comment: | + IconTranformType values + +# #### + +- enum: + values: + - name: kTransformNone + value: 0 + +# #### + +- enum: + values: + - name: svLarge1Bit + value: 0x01 + - name: svLarge4Bit + value: 0x02 + - name: svLarge8Bit + value: 0x04 + - name: svSmall1Bit + value: 0x0100 + - name: svSmall4Bit + value: 0x0200 + - name: svSmall8Bit + value: 0x0400 + - name: svMini1Bit + value: 0x010000 + - name: svMini4Bit + value: 0x020000 + - name: svMini8Bit + value: 0x040000 + - name: svAllLargeData + value: 0xFF + - name: svAllSmallData + value: 0xFF00 + - name: svAllMiniData + value: 0xFF0000 + - name: svAll1BitData + value: 0x010101 + - name: svAll4BitData + value: 0x020202 + - name: svAll8BitData + value: 0x040404 + - name: svAllAvailableData + value: 0xFFFFFF + comment: | + IconSelectorValue values + #### what kind of eediot at apple named all the other icon flag + types *Type, except this one? + +# #### + +- enum: + values: + - name: noMaskFoundErr + value: -1000 + +# #### + +- typedef: + name: IconActionUPP + type: ProcPtr + +# #### + +- typedef: + name: IconGetterUPP + type: ProcPtr + +# #### + +- typedef: + name: IconSelectorValue + type: uint32_t + +# #### + +- typedef: + name: IconAlignmentType + type: int16_t + +# #### + +- typedef: + name: IconTransformType + type: int16_t + +# #### + +- struct: + name: CIcon + members: + - name: iconPMap + type: PixMap + - name: iconMask + type: BitMap + - name: iconBMap + type: BitMap + - name: iconData + type: Handle + - name: iconMaskData + type: int16_t[1] + size: 84 + +# #### + +- typedef: + name: CIconPtr + type: CIcon* + +# #### + +- typedef: + name: CIconHandle + type: CIconPtr* + +# #### + +- dispatcher: + name: IconDispatch + trap: 0xABC9 + selector-location: D0W + comment: | + icon utility function prototypes + +# #### + +- function: + name: PlotIconID + return: OSErr + args: + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: tranform + type: IconTransformType + - name: res_id + type: int16_t + dispatcher: IconDispatch + selector: 0x0500 + executor: C_ + +# #### + +- function: + name: PlotIconMethod + return: OSErr + args: + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: transform + type: IconTransformType + - name: method + type: IconGetterUPP + - name: data + type: void* + dispatcher: IconDispatch + selector: 0x0805 + executor: C_ + +# #### + +- function: + name: PlotCIcon + args: + - name: rect + type: const Rect* + - name: icon + type: CIconHandle + trap: 0xAA1F + executor: C_ + +# #### + +- function: + name: PlotIcon + args: + - name: rect + type: const Rect* + - name: icon + type: Handle + trap: 0xA94B + executor: C_ + +# #### + +- function: + name: PlotIconHandle + return: OSErr + args: + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: transform + type: IconTransformType + - name: icon + type: Handle + dispatcher: IconDispatch + selector: 0x061D + executor: C_ + +# #### + +- function: + name: PlotCIconHandle + return: OSErr + args: + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: transform + type: IconTransformType + - name: icon + type: CIconHandle + dispatcher: IconDispatch + selector: 0x061F + executor: C_ + +# #### + +- function: + name: PlotSICNHandle + return: OSErr + args: + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: transform + type: IconTransformType + - name: icon + type: Handle + dispatcher: IconDispatch + selector: 0x061E + executor: C_ + +# #### + +- function: + name: GetIcon + return: Handle + args: + - name: icon_id + type: int16_t + trap: 0xA9BB + executor: C_ + +# #### + +- function: + name: GetCIcon + return: CIconHandle + args: + - name: icon_id + type: int16_t + trap: 0xAA1E + executor: C_ + +# #### + +- function: + name: DisposeCIcon + args: + - name: icon + type: CIconHandle + trap: 0xAA25 + executor: C_ + +# #### + +- function: + name: GetIconSuite + return: OSErr + args: + - name: suite + type: Handle* + - name: res_id + type: int16_t + - name: selector + type: IconSelectorValue + dispatcher: IconDispatch + selector: 0x0501 + executor: C_ + +# #### + +- function: + name: NewIconSuite + return: OSErr + args: + - name: suite + type: Handle* + dispatcher: IconDispatch + selector: 0x0207 + executor: C_ + +# #### + +- function: + name: AddIconToSuite + return: OSErr + args: + - name: icon_data + type: Handle + - name: suite + type: Handle + - name: type + type: ResType + dispatcher: IconDispatch + selector: 0x0608 + executor: C_ + +# #### + +- function: + name: GetIconFromSuite + return: OSErr + args: + - name: icon_data + type: Handle* + - name: suite + type: Handle + - name: type + type: ResType + dispatcher: IconDispatch + selector: 0x0609 + executor: C_ + +# #### + +- function: + name: PlotIconSuite + return: OSErr + args: + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: transform + type: IconTransformType + - name: suite + type: Handle + dispatcher: IconDispatch + selector: 0x0603 + executor: C_ + +# #### + +- function: + name: ForEachIconDo + return: OSErr + args: + - name: suite + type: Handle + - name: selector + type: IconSelectorValue + - name: action + type: IconActionUPP + - name: data + type: void* + dispatcher: IconDispatch + selector: 0x080A + executor: C_ + +# #### + +- function: + name: GetSuiteLabel + return: int16_t + args: + - name: suite + type: Handle + dispatcher: IconDispatch + selector: 0x0217 + executor: C_ + +# #### + +- function: + name: SetSuiteLabel + return: OSErr + args: + - name: suite + type: Handle + - name: label + type: int16_t + dispatcher: IconDispatch + selector: 0x0316 + executor: C_ + +# #### + +- function: + name: GetLabel + return: OSErr + args: + - name: label + type: int16_t + - name: label_color + type: RGBColor* + - name: label_string + type: Str255 + dispatcher: IconDispatch + selector: 0x050B + executor: C_ + +# #### + +- function: + name: DisposeIconSuite + return: OSErr + args: + - name: suite + type: Handle + - name: dispose_data_p + type: Boolean + dispatcher: IconDispatch + selector: 0x0302 + executor: C_ + +# #### + +- function: + name: IconSuiteToRgn + return: OSErr + args: + - name: rgn + type: RgnHandle + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: suite + type: Handle + dispatcher: IconDispatch + selector: 0x0714 + executor: C_ + +# #### + +- function: + name: IconIDToRgn + return: OSErr + args: + - name: rgn + type: RgnHandle + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: icon_id + type: int16_t + dispatcher: IconDispatch + selector: 0x0613 + executor: C_ + +# #### + +- function: + name: IconMethodToRgn + return: OSErr + args: + - name: rgn + type: RgnHandle + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: method + type: IconGetterUPP + - name: data + type: void* + dispatcher: IconDispatch + selector: 0x0915 + executor: C_ + +# #### + +- function: + name: PtInIconSuite + return: Boolean + args: + - name: test_pt + type: Point + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: suite + type: Handle + dispatcher: IconDispatch + selector: 0x070E + executor: C_ + +# #### + +- function: + name: PtInIconID + return: Boolean + args: + - name: test_pt + type: Point + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: icon_id + type: int16_t + dispatcher: IconDispatch + selector: 0x060D + executor: C_ + +# #### + +- function: + name: PtInIconMethod + return: Boolean + args: + - name: test_pt + type: Point + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: method + type: IconGetterUPP + - name: data + type: void* + dispatcher: IconDispatch + selector: 0x090F + executor: C_ + +# #### + +- function: + name: RectInIconSuite + return: Boolean + args: + - name: test_rect + type: const Rect* + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: suite + type: Handle + dispatcher: IconDispatch + selector: 0x0711 + executor: C_ + +# #### + +- function: + name: RectInIconID + return: Boolean + args: + - name: test_rect + type: const Rect* + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: icon_id + type: int16_t + dispatcher: IconDispatch + selector: 0x0610 + executor: C_ + +# #### + +- function: + name: RectInIconMethod + return: Boolean + args: + - name: test_rect + type: const Rect* + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: method + type: IconGetterUPP + - name: data + type: void* + dispatcher: IconDispatch + selector: 0x0912 + executor: C_ + +# #### + +- function: + name: MakeIconCache + return: OSErr + args: + - name: cache + type: Handle* + - name: make_icon + type: IconGetterUPP + - name: data + type: void* + dispatcher: IconDispatch + selector: 0x0604 + executor: C_ + +# #### + +- function: + name: LoadIconCache + return: OSErr + args: + - name: rect + type: const Rect* + - name: align + type: IconAlignmentType + - name: transform + type: IconTransformType + - name: cache + type: Handle + dispatcher: IconDispatch + selector: 0x0606 + executor: C_ + +# #### + +- function: + name: GetIconCacheData + return: OSErr + args: + - name: cache + type: Handle + - name: data + type: void** + dispatcher: IconDispatch + selector: 0x0419 + executor: C_ + +# #### + +- function: + name: SetIconCacheData + return: OSErr + args: + - name: cache + type: Handle + - name: data + type: void* + dispatcher: IconDispatch + selector: 0x041A + executor: C_ + +# #### + +- function: + name: GetIconCacheProc + return: OSErr + args: + - name: cache + type: Handle + - name: proc + type: IconGetterUPP* + dispatcher: IconDispatch + selector: 0x041B + executor: C_ + +# #### + +- function: + name: SetIconCacheProc + return: OSErr + args: + - name: cache + type: Handle + - name: proc + type: IconGetterUPP + dispatcher: IconDispatch + selector: 0x041C + executor: C_ diff --git a/defs/IntlUtil.yaml b/defs/IntlUtil.yaml new file mode 100644 index 0000000..9a44ca4 --- /dev/null +++ b/defs/IntlUtil.yaml @@ -0,0 +1,580 @@ +- enum: + values: + - name: currSymLead + value: 16 + - name: currNegSym + value: 32 + - name: currTrailingZ + value: 64 + - name: currLeadingZ + value: 128 + +# #### + +- enum: + values: + - name: mdy + value: 0 + - name: dmy + value: 1 + - name: ymd + value: 2 + +# #### + +- enum: + values: + - name: dayLdingZ + value: 32 + - name: mntLdingZ + value: 64 + - name: century + value: 128 + +# #### + +- enum: + values: + - name: secLeadingZ + value: 32 + - name: minLeadingZ + value: 64 + - name: hrLeadingZ + value: 128 + +# #### + +- enum: + values: + - name: verUS + value: 0 + - name: verFrance + value: 1 + - name: verBritain + value: 2 + - name: verGermany + value: 3 + - name: verItaly + value: 4 + - name: verNetherlands + value: 5 + - name: verBelgiumLux + value: 6 + - name: verSweden + value: 7 + - name: verSpain + value: 8 + - name: verDenmark + value: 9 + - name: verPortugal + value: 10 + - name: verFrCanada + value: 11 + - name: verNorway + value: 12 + - name: verIsreal + value: 13 + - name: verJapan + value: 14 + - name: verAustralia + value: 15 + - name: verArabia + value: 16 + - name: verFinland + value: 17 + - name: verFrSwiss + value: 18 + - name: verGrSwiss + value: 19 + - name: verGreece + value: 20 + - name: verIceland + value: 21 + - name: verMalta + value: 22 + - name: verCyprus + value: 23 + - name: verTurkey + value: 24 + - name: verYugoslavia + value: 25 + +# #### + +- struct: + name: Intl0Rec + members: + - name: decimalPt + type: Byte + - name: thousSep + type: Byte + - name: listSep + type: Byte + - name: currSym1 + type: Byte + - name: currSym2 + type: Byte + - name: currSym3 + type: Byte + - name: currFmt + type: Byte + - name: dateOrder + type: Byte + - name: shrtDateFmt + type: Byte + - name: dateSep + type: Byte + - name: timeCycle + type: Byte + - name: timeFmt + type: Byte + - name: mornStr + type: LONGINT + - name: eveStr + type: LONGINT + - name: timeSep + type: Byte + - name: time1Suff + type: Byte + - name: time2Suff + type: Byte + - name: time3Suff + type: Byte + - name: time4Suff + type: Byte + - name: time5Suff + type: Byte + - name: time6Suff + type: Byte + - name: time7Suff + type: Byte + - name: time8Suff + type: Byte + - name: metricSys + type: Byte + - name: intl0Vers + type: INTEGER + size: 32 + +# #### + +- typedef: + name: Intl0Ptr + type: Intl0Rec* + +# #### + +- typedef: + name: Intl0Hndl + type: Intl0Ptr* + +# #### + +- typedef: + name: STRING15 + type: Byte[16] + +# #### + +- struct: + name: Intl1Rec + members: + - name: days + type: STRING15[7] + - name: months + type: STRING15[12] + - name: suppressDay + type: Byte + - name: lngDateFmt + type: Byte + - name: dayLeading0 + type: Byte + - name: abbrLen + type: Byte + - name: st0 + type: LONGINT + - name: st1 + type: LONGINT + - name: st2 + type: LONGINT + - name: st3 + type: LONGINT + - name: st4 + type: LONGINT + - name: intl1Vers + type: INTEGER + - name: localRtn + type: INTEGER + size: 332 + +# #### + +- typedef: + name: Intl1Ptr + type: Intl1Rec* + +# #### + +- typedef: + name: Intl1Hndl + type: Intl1Ptr* + +# #### + +- typedef: + name: LongDateTime + type: comp + +# #### + +- typedef: + name: DateForm + type: SignedByte + +# #### + +- enum: + values: + - name: shortDate + value: 0 + - name: longDate + value: 1 + - name: abbrevDate + value: 2 + +# #### + +- dispatcher: + name: Pack6 + trap: 0xA9ED + selector-location: StackW + +# #### + +- function: + name: IUDatePString + args: + - name: date + type: LONGINT + - name: form + type: DateForm + - name: p + type: StringPtr + - name: h + type: Handle + dispatcher: Pack6 + selector: 0x000E + executor: C_ + +# #### + +- function: + name: GetIntlResource + return: Handle + args: + - name: id + type: INTEGER + dispatcher: Pack6 + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: IUDateString + args: + - name: date + type: LONGINT + - name: form + type: DateForm + - name: p + type: StringPtr + dispatcher: Pack6 + selector: 0x0 + executor: C_ + +# #### + +- function: + name: IUTimePString + args: + - name: date + type: LONGINT + - name: secs + type: Boolean + - name: p + type: StringPtr + - name: h + type: Handle + dispatcher: Pack6 + selector: 0x0010 + executor: C_ + +# #### + +- function: + name: IUTimeString + args: + - name: date + type: LONGINT + - name: secs + type: Boolean + - name: p + type: StringPtr + dispatcher: Pack6 + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: IsMetric + return: Boolean + dispatcher: Pack6 + selector: 0x0004 + executor: C_ + +# #### + +- function: + name: SetIntlResource + args: + - name: rn + type: INTEGER + - name: id + type: INTEGER + - name: newh + type: Handle + dispatcher: Pack6 + selector: 0x0008 + executor: C_ + +# #### + +- function: + name: IUMagString + return: INTEGER + args: + - name: ptr1 + type: Ptr + - name: ptr2 + type: Ptr + - name: len1 + type: INTEGER + - name: len2 + type: INTEGER + dispatcher: Pack6 + selector: 0x000A + executor: C_ + +# #### + +- function: + name: IUCompString + return: INTEGER + args: + - name: str1 + type: ConstStringPtr + - name: str2 + type: ConstStringPtr + +# #### + +- function: + name: IUMagIDString + return: INTEGER + args: + - name: ptr1 + type: Ptr + - name: ptr2 + type: Ptr + - name: len1 + type: INTEGER + - name: len2 + type: INTEGER + dispatcher: Pack6 + selector: 0x000C + executor: C_ + +# #### + +- function: + name: IUEqualString + return: INTEGER + args: + - name: str1 + type: ConstStringPtr + - name: str2 + type: ConstStringPtr + +# #### + +- function: + name: IUMystery + args: + - name: arg1 + type: Ptr + - name: arg2 + type: Ptr + - name: arg3 + type: INTEGER + - name: arg4 + type: INTEGER + dispatcher: Pack6 + selector: 0x0012 + executor: C_ + +# #### + +- function: + name: IULDateString + args: + - name: datetimep + type: LongDateTime* + - name: longflag + type: DateForm + - name: result + type: Str255 + - name: intlhand + type: Handle + dispatcher: Pack6 + selector: 0x0014 + executor: C_ + +# #### + +- function: + name: IULTimeString + args: + - name: datetimep + type: LongDateTime* + - name: wantseconds + type: Boolean + - name: result + type: Str255 + - name: intlhand + type: Handle + dispatcher: Pack6 + selector: 0x0016 + executor: C_ + +# #### + +- function: + name: ClearIntlResourceCache + dispatcher: Pack6 + selector: 0x0018 + executor: C_ + +# #### + +- function: + name: IUMagPString + return: INTEGER + args: + - name: ptra + type: Ptr + - name: ptrb + type: Ptr + - name: lena + type: INTEGER + - name: lenb + type: INTEGER + - name: itl2hand + type: Handle + dispatcher: Pack6 + selector: 0x001A + executor: C_ + +# #### + +- function: + name: IUMagIDPString + return: INTEGER + args: + - name: ptra + type: Ptr + - name: ptrb + type: Ptr + - name: lena + type: INTEGER + - name: lenb + type: INTEGER + - name: itl2hand + type: Handle + dispatcher: Pack6 + selector: 0x001C + executor: C_ + +# #### + +- function: + name: IUScriptOrder + return: INTEGER + args: + - name: script1 + type: ScriptCode + - name: script2 + type: ScriptCode + dispatcher: Pack6 + selector: 0x001E + executor: C_ + +# #### + +- function: + name: IULangOrder + return: INTEGER + args: + - name: l1 + type: LangCode + - name: l2 + type: LangCode + dispatcher: Pack6 + selector: 0x0020 + executor: C_ + +# #### + +- function: + name: IUTextOrder + return: INTEGER + args: + - name: ptra + type: Ptr + - name: ptrb + type: Ptr + - name: lena + type: INTEGER + - name: lenb + type: INTEGER + - name: scripta + type: ScriptCode + - name: bscript + type: ScriptCode + - name: langa + type: LangCode + - name: langb + type: LangCode + dispatcher: Pack6 + selector: 0x0022 + executor: C_ + +# #### + +- function: + name: GetIntlResourceTable + args: + - name: script + type: ScriptCode + - name: tablecode + type: INTEGER + - name: itlhandlep + type: Handle* + - name: offsetp + type: LONGINT* + - name: lengthp + type: LONGINT* + dispatcher: Pack6 + selector: 0x0024 + executor: C_ diff --git a/defs/ListMgr.yaml b/defs/ListMgr.yaml new file mode 100644 index 0000000..47cffc5 --- /dev/null +++ b/defs/ListMgr.yaml @@ -0,0 +1,551 @@ +- typedef: + name: Cell + type: Point + +# #### + +- typedef: + name: DataArray + type: Byte[32001] + +# #### + +- typedef: + name: DataPtr + type: DataArray* + +# #### + +- typedef: + name: DataHandle + type: DataPtr* + +# #### + +- funptr: + return: Boolean + name: ListClickLoopUPP + +# #### + +- struct: + name: ListRec + members: + - name: rView + type: Rect + - name: port + type: GrafPtr + - name: indent + type: Point + - name: cellSize + type: Point + - name: visible + type: Rect + - name: vScroll + type: ControlHandle + - name: hScroll + type: ControlHandle + - name: selFlags + type: SignedByte + - name: lActive + type: Boolean + - name: lReserved + type: SignedByte + - name: listFlags + type: SignedByte + - name: clikTime + type: LONGINT + - name: clikLoc + type: Point + - name: mouseLoc + type: Point + - name: lClikLoop + type: ListClickLoopUPP + - name: lastClick + type: Cell + - name: refCon + type: LONGINT + - name: listDefProc + type: Handle + - name: userHandle + type: Handle + - name: dataBounds + type: Rect + - name: cells + type: DataHandle + - name: maxIndex + type: INTEGER + - name: cellArray + type: INTEGER[1] + size: 88 + +# #### + +- typedef: + name: ListPtr + type: ListRec* + +# #### + +- typedef: + name: ListHandle + type: ListPtr* + +# #### + +- enum: + values: + - name: lGrowBox + value: 0x20 + - name: lMysteryFlags + value: 0x14 + - name: lDrawingModeOff + value: 8 + - name: lDoVAutoscroll + value: 2 + - name: lDoHAutoscroll + value: 1 + +# #### + +- enum: + values: + - name: lOnlyOne + value: -128 + - name: lExtendDrag + value: 64 + - name: lNoDisjoint + value: 32 + +# #### + +- enum: + values: + - name: lNoExtend + value: 16 + - name: lNoRect + value: 8 + - name: lUseSense + value: 4 + - name: lNoNilHilite + value: 2 + +# #### + +- enum: + values: + - name: lInitMsg + value: 0 + - name: lDrawMsg + value: 1 + - name: lHiliteMsg + value: 2 + - name: lCloseMsg + value: 3 + +# #### + +- dispatcher: + name: Pack0 + trap: 0xA9E7 + selector-location: StackW + +# #### + +- function: + name: LGetCellDataLocation + args: + - name: offsetp + type: INTEGER* + - name: lenp + type: INTEGER* + - name: cell + type: Cell + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0034 + executor: C_ + +# #### + +- function: + name: LNextCell + return: Boolean + args: + - name: hnext + type: Boolean + - name: vnext + type: Boolean + - name: cellp + type: Cell* + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0048 + executor: C_ + +# #### + +- function: + name: LRect + args: + - name: cellrect + type: Rect* + - name: cell + type: Cell + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x004C + executor: C_ + +# #### + +- function: + name: LSearch + return: Boolean + args: + - name: dp + type: Ptr + - name: dl + type: INTEGER + - name: proc + type: Ptr + - name: cellp + type: Cell* + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0054 + executor: C_ + +# #### + +- function: + name: LSize + args: + - name: width + type: INTEGER + - name: height + type: INTEGER + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0060 + executor: C_ + +# #### + +- function: + name: LAddColumn + return: INTEGER + args: + - name: count + type: INTEGER + - name: coln + type: INTEGER + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0004 + executor: C_ + +# #### + +- function: + name: LAddRow + return: INTEGER + args: + - name: count + type: INTEGER + - name: rown + type: INTEGER + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0008 + executor: C_ + +# #### + +- function: + name: LDelColumn + args: + - name: count + type: INTEGER + - name: coln + type: INTEGER + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0020 + executor: C_ + +# #### + +- function: + name: LDelRow + args: + - name: count + type: INTEGER + - name: rown + type: INTEGER + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0024 + executor: C_ + +# #### + +- function: + name: LNew + return: ListHandle + args: + - name: rview + type: const Rect* + - name: bounds + type: const Rect* + - name: csize + type: Point + - name: proc + type: INTEGER + - name: wind + type: WindowPtr + - name: draw + type: Boolean + - name: grow + type: Boolean + - name: scrollh + type: Boolean + - name: scrollv + type: Boolean + dispatcher: Pack0 + selector: 0x0044 + executor: C_ + +# #### + +- function: + name: LDispose + args: + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0028 + executor: C_ + +# #### + +- function: + name: LDraw + args: + - name: cell + type: Cell + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0030 + executor: C_ + +# #### + +- function: + name: LSetDrawingMode + args: + - name: draw + type: Boolean + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x002C + executor: C_ + +# #### + +- function: + name: LScroll + args: + - name: ncol + type: INTEGER + - name: nrow + type: INTEGER + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0050 + executor: C_ + +# #### + +- function: + name: LAutoScroll + args: + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0010 + executor: C_ + +# #### + +- function: + name: LUpdate + args: + - name: rgn + type: RgnHandle + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0064 + executor: C_ + +# #### + +- function: + name: LActivate + args: + - name: act + type: Boolean + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0 + executor: C_ + +# #### + +- function: + name: LClick + return: Boolean + args: + - name: pt + type: Point + - name: mods + type: INTEGER + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0018 + executor: C_ + +# #### + +- function: + name: LLastClick + return: LONGINT + args: + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0040 + executor: C_ + +# #### + +- function: + name: LSetSelect + args: + - name: setit + type: Boolean + - name: cell + type: Cell + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x005C + executor: C_ + +# #### + +- function: + name: LAddToCell + args: + - name: dp + type: Ptr + - name: dl + type: INTEGER + - name: cell + type: Cell + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x000C + executor: C_ + +# #### + +- function: + name: LClrCell + args: + - name: cell + type: Cell + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x001C + executor: C_ + +# #### + +- function: + name: LGetCell + args: + - name: dp + type: Ptr + - name: dlp + type: INTEGER* + - name: cell + type: Cell + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0038 + executor: C_ + +# #### + +- function: + name: LSetCell + args: + - name: dp + type: Ptr + - name: dl + type: INTEGER + - name: cell + type: Cell + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0058 + executor: C_ + +# #### + +- function: + name: LCellSize + args: + - name: csize + type: Point + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x0014 + executor: C_ + +# #### + +- function: + name: LGetSelect + return: Boolean + args: + - name: next + type: Boolean + - name: cellp + type: Cell* + - name: list + type: ListHandle + dispatcher: Pack0 + selector: 0x003C + executor: C_ diff --git a/defs/LowMem.yaml b/defs/LowMem.yaml new file mode 100644 index 0000000..d1f0f72 --- /dev/null +++ b/defs/LowMem.yaml @@ -0,0 +1,201 @@ +- lowmem: + name: nilhandle + type: Ptr + address: 0x00 + comment: | + Declarations of low memory globals which haven't been put anywhere else + yet follow. Whenever a low memory global clearly belongs to one manager/module, + put it should live in the appropriate header. + There is also a complete list of low memory globals in globals.cpp, + which is not used but might be nice to have. + rsys/misc MADEUP (true-b); + +# #### + +- lowmem: + name: trapvectors + type: LONGINT[10] + address: 0x80 + comment: | + * NOTE: MacWrite starts writing longwords at location 0x80 for TRAPs + rsys/misc WHOKNOWS (true-b); + +# #### + +- lowmem: + name: dodusesit + type: Ptr + address: 0xE4 + comment: | + rsys/misc WHOKNOWS (true-b); + +# #### + +- lowmem: + name: hyperlong + type: LONGINT + address: 0x1AA + comment: | + * Hypercard does a movel to this location. + rsys/misc WHOKNOWS (true-b); + +# #### + +- lowmem: + name: mathones + type: LONGINT + address: 0x282 + comment: | + * NOTE: mathones is a LONGINT that Mathematica looks at that contains -1 + * on a Mac+ + rsys/misc WHOKNOWS (true-b); + +# #### + +- lowmem: + name: ROM85 + type: INTEGER + address: 0x28E + comment: | + * NOTE: Theoretically ROM85 is mentioned in IMV, but I don't know where. + * On a Mac+ the value 0x7FFF is stored there. + * tim: It is at least on page IMV-328. + MacTypes IMV-328 (true-b); + +# #### + +- lowmem: + name: BufTgFNum + type: LONGINT + address: 0x2FC + comment: | + DiskDvr IMII-212 (false); + +# #### + +- lowmem: + name: BufTgFFlg + type: INTEGER + address: 0x300 + comment: | + DiskDvr IMII-212 (false); + +# #### + +- lowmem: + name: BufTgFBkNum + type: INTEGER + address: 0x302 + comment: | + DiskDvr IMII-212 (false); + +# #### + +- lowmem: + name: BufTgDate + type: LONGINT + address: 0x304 + comment: | + DiskDvr IMII-212 (false); + +# #### + +- lowmem: + name: MCLKPCmiss1 + type: INTEGER + address: 0x3A0 + comment: | + MacLinkPC badaccess (true-b); + +# #### + +- lowmem: + name: MCLKPCmiss2 + type: INTEGER + address: 0x3A6 + comment: | + MacLinkPC badaccess (true-b); + +# #### + +- lowmem: + name: JFLUSH + type: VoidUPP + address: 0x6F4 + comment: | + * JFLUSH is a guess from disassembling some of Excel 3.0 + idunno guess (true-b); + +# #### + +- lowmem: + name: JResUnknown1 + type: VoidUPP + address: 0x700 + comment: | + idunno resedit (true-b); + +# #### + +- lowmem: + name: JResUnknown2 + type: VoidUPP + address: 0x714 + comment: | + idunno resedit (true-b); + +# #### + +- lowmem: + name: graphlooksat + type: INTEGER + address: 0x952 + comment: | + * NOTE: The graphing program looks for a -1 in 0x952 + rsys/misc WHOKNOWS (true-b); + +# #### + +- lowmem: + name: macwritespace + type: LONGINT + address: 0x954 + comment: | + * NOTE: MacWrite stores a copy of the trap address for LoadSeg in 954 + rsys/misc WHOKNOWS (true-b); + +# #### + +- lowmem: + name: DSErrCode + type: INTEGER + address: 0xAF0 + comment: | + MacTypes IMII-362 (true); + +# #### + +- lowmem: + name: SCSIFlags + type: INTEGER + address: 0xB22 + comment: | + uknown Private.a (true-b); + +# #### + +- lowmem: + name: LastSPExtra + type: LONGINT + address: 0xB4C + comment: | + rsys/misc WHOKNOWS (true-b); + +# #### + +- lowmem: + name: lastlowglobal + type: LONGINT + address: 0x2000 + comment: | + rsys/misc MadeUp (true-b); diff --git a/defs/MacTypes.yaml b/defs/MacTypes.yaml new file mode 100644 index 0000000..ba1d0f5 --- /dev/null +++ b/defs/MacTypes.yaml @@ -0,0 +1,361 @@ +- typedef: + name: INTEGER + type: int16_t + +# #### + +- typedef: + name: LONGINT + type: int32_t + +# #### + +- typedef: + name: ULONGINT + type: uint32_t + +# #### + +- typedef: + name: Boolean + type: int8_t + +# #### + +- typedef: + name: CharParameter + type: int16_t + comment: | + very important not to use this as char + +# #### + +- typedef: + name: SignedByte + type: int8_t + +# #### + +- typedef: + name: Byte + type: uint8_t + +# #### + +- typedef: + name: Ptr + type: char* + +# #### + +- typedef: + name: Handle + type: Ptr* + +# #### + +- typedef: + name: Boolean + type: int8_t + +# #### + +- typedef: + name: SInt8 + type: int8_t + +# #### + +- typedef: + name: UInt8 + type: uint8_t + +# #### + +- typedef: + name: SInt16 + type: int16_t + +# #### + +- typedef: + name: UInt16 + type: uint16_t + +# #### + +- typedef: + name: SInt32 + type: int32_t + +# #### + +- typedef: + name: UInt32 + type: uint32_t + +# #### + +- typedef: + name: Str15 + type: Byte[16] + +# #### + +- typedef: + name: Str31 + type: Byte[32] + +# #### + +- typedef: + name: Str32 + type: Byte[33] + +# #### + +- typedef: + name: Str63 + type: Byte[64] + +# #### + +- typedef: + name: Str255 + type: Byte[256] + +# #### + +- typedef: + name: StringPtr + type: Byte* + +# #### + +- typedef: + name: ConstStringPtr + type: const uint8_t* + +# #### + +- typedef: + name: ConstStr255Param + type: ConstStringPtr + +# #### + +- typedef: + name: ConstStr63Param + type: ConstStringPtr + +# #### + +- typedef: + name: ConstStr31Param + type: ConstStringPtr + +# #### + +- typedef: + name: ConstStr16Param + type: ConstStringPtr + +# #### + +- typedef: + name: StringHandle + type: StringPtr* + +# #### + +- struct: + name: RoutineDescriptor + +# #### + +- typedef: + name: UniversalProcPtr + type: RoutineDescriptor* + +# #### + +- funptr: + name: VoidUPP + +# #### + +- typedef: + name: Fixed + type: LONGINT + +# #### + +- typedef: + name: Fract + type: LONGINT + +# #### + +- typedef: + name: SmallFract + type: uint16_t + comment: | + SmallFract represnts values between 0 and 65535 + +# #### + +- enum: + values: + - name: MaxSmallFract + value: 0xFFFF + +# #### + +- typedef: + name: Extended + type: double + +# #### + +- typedef: + name: Size + type: LONGINT + +# #### + +- typedef: + name: OSErr + type: INTEGER + +# #### + +- executor_only: + code: | + class OSErrorException : public std::runtime_error + { + public: + OSErr code; + + OSErrorException(OSErr err) : std::runtime_error("oserror"), code(err) {} + }; + +# #### + +- typedef: + name: OSType + type: LONGINT + +# #### + +- typedef: + name: ResType + type: LONGINT + +# #### + +- executor_only: + code: | + constexpr OSType operator"" _4(const char*x, size_t n) + { + assert(n == 4); + return (uint8_t(x[0]) << 24) | (uint8_t(x[1]) << 16) | (uint8_t(x[2]) << 8) | uint8_t(x[3]); + } + +# #### + +- union: + name: QElem + +# #### + +- typedef: + name: QElemPtr + type: QElem* + +# #### + +- struct: + name: QHdr + members: + - name: qFlags + type: INTEGER + - name: qHead + type: QElemPtr + - name: qTail + type: QElemPtr + size: 10 + +# #### + +- typedef: + name: QHdrPtr + type: QHdr* + +# #### + +- enum: + values: + - name: noErr + value: 0 + - name: paramErr + value: -50 + +# #### + +- struct: + name: Rect + members: + - name: top + type: INTEGER + - name: left + type: INTEGER + - name: bottom + type: INTEGER + - name: right + type: INTEGER + size: 8 + +# #### + +- typedef: + name: RectPtr + type: Rect* + +# #### + +- executor_only: + code: | + inline short RECT_WIDTH(const Rect *r) + { + return r->right - r->left; + } + inline short RECT_HEIGHT(const Rect *r) + { + return r->bottom - r->top; + } + +# #### + +- typedef: + name: ScriptCode + type: INTEGER + comment: | + from IntlUtil.h + +# #### + +- typedef: + name: LangCode + type: INTEGER + +# #### + +- not-for: executor + struct: + name: Point + members: + - name: v + type: INTEGER + - name: h + type: INTEGER + size: 4 diff --git a/defs/MemoryMgr.yaml b/defs/MemoryMgr.yaml new file mode 100644 index 0000000..b5efcda --- /dev/null +++ b/defs/MemoryMgr.yaml @@ -0,0 +1,1088 @@ +- enum: + values: + - name: memFullErr + value: -108 + - name: memLockedErr + value: -117 + - name: memPurErr + value: -112 + - name: memWZErr + value: -111 + +# #### + +- enum: + values: + - name: nilHandleErr + value: -109 + +# #### + +- enum: + values: + - name: memROZErr + value: -99 + - name: memAdrErr + value: -110 + - name: memAZErr + value: -113 + - name: memPCErr + value: -114 + - name: memBCErr + value: -115 + - name: memSCErr + value: -116 + +# #### + +- funptr: + return: LONGINT + args: + - type: Size + name: GrowZoneUPP + +# #### + +- struct: + name: block_header_t + +# #### + +- struct: + name: Zone + members: + - name: bkLim + type: Ptr + - name: purgePtr + type: Ptr + - name: hFstFree + type: Ptr + - name: zcbFree + type: LONGINT + - name: gzProc + type: GrowZoneUPP + - name: moreMast + type: INTEGER + - name: flags + type: INTEGER + - name: cntRel + type: INTEGER + - name: maxRel + type: INTEGER + - name: cntNRel + type: INTEGER + - name: maxNRel + type: INTEGER + - name: cntEmpty + type: INTEGER + - name: cntHandles + type: INTEGER + - name: minCBFree + type: LONGINT + - name: purgeProc + type: ProcPtr + - name: sparePtr + type: Ptr + - name: allocPtr + type: block_header_t* + - name: heapData + type: INTEGER + size: 54 + +# #### + +- typedef: + name: THz + type: Zone* + +# #### + +- lowmem: + name: MemTop + type: Ptr + address: 0x108 + comment: | + MemoryMgr IMII-19 (true); + +# #### + +- lowmem: + name: BufPtr + type: Ptr + address: 0x10C + comment: | + MemoryMgr IMII-19 (true-b); + +# #### + +- lowmem: + name: HeapEnd + type: Ptr + address: 0x114 + comment: | + MemoryMgr IMII-19 (true); + +# #### + +- lowmem: + name: TheZone + type: THz + address: 0x118 + comment: | + MemoryMgr IMII-31 (true); + +# #### + +- lowmem: + name: ApplLimit + type: Ptr + address: 0x130 + comment: | + MemoryMgr IMII-19 (true); + +# #### + +- lowmem: + name: MemErr + type: INTEGER + address: 0x220 + comment: | + MemoryMgr IMIV-80 (true); + +# #### + +- lowmem: + name: SysZone + type: THz + address: 0x2A6 + comment: | + MemoryMgr IMII-19 (true); + +# #### + +- lowmem: + name: ApplZone + type: THz + address: 0x2AA + comment: | + MemoryMgr IMII-19 (true); + +# #### + +- lowmem: + name: ROMBase + type: Ptr + address: 0x2AE + comment: | + MemoryMgr IMIV-236 (true-b); + +# #### + +- lowmem: + name: RAMBase + type: Ptr + address: 0x2B2 + comment: | + MemoryMgr IMI-87 (false); + +# #### + +- lowmem: + name: heapcheck + type: Ptr + address: 0x316 + comment: | + MemoryMgr SysEqu.a (true-b); + +# #### + +- lowmem: + name: Lo3Bytes + type: LONGINT + address: 0x31A + comment: | + MemoryMgr IMI-85 (true); + +# #### + +- lowmem: + name: MinStack + type: LONGINT + address: 0x31E + comment: | + MemoryMgr IMII-17 (true-b); + +# #### + +- lowmem: + name: DefltStack + type: LONGINT + address: 0x322 + comment: | + MemoryMgr IMII-17 (true-b); + +# #### + +- lowmem: + name: GZRootHnd + type: Handle + address: 0x328 + comment: | + MemoryMgr IMI-43 (true); + +# #### + +- lowmem: + name: GZMoveHnd + type: Handle + address: 0x330 + comment: | + MemoryMgr LowMem.h (false); + +# #### + +- lowmem: + name: IAZNotify + type: ProcPtr + address: 0x33C + comment: | + MemoryMgr ThinkC (true-b); + +# #### + +- lowmem: + name: CurrentA5 + type: Ptr + address: 0x904 + comment: | + MemoryMgr IMI-95 (true); + +# #### + +- lowmem: + name: CurStackBase + type: Ptr + address: 0x908 + comment: | + MemoryMgr IMII-19 (true-b); + +# #### + +- lowmem: + name: Scratch20 + type: Byte[20] + address: 0x1E4 + comment: | + MemoryMgr IMI-85 (true); + +# #### + +- lowmem: + name: ToolScratch + type: Byte[8] + address: 0x9CE + comment: | + MemoryMgr IMI-85 (true); + +# #### + +- lowmem: + name: Scratch8 + type: Byte[8] + address: 0x9FA + comment: | + MemoryMgr IMI-85 (true); + +# #### + +- lowmem: + name: OneOne + type: LONGINT + address: 0xA02 + comment: | + MemoryMgr IMI-85 (true); + +# #### + +- lowmem: + name: MinusOne + type: LONGINT + address: 0xA06 + comment: | + MemoryMgr IMI-85 (true); + +# #### + +- lowmem: + name: ApplScratch + type: Byte[12] + address: 0xA78 + comment: | + MemoryMgr IMI-85 (true); + +# #### + +- executor_only: + code: | + /* traps which can have a `sys' or `clear' bit set */ + #define SYSBIT (1 << 10) + #define CLRBIT (1 << 9) + + namespace callconv + { + template struct ReturnMemErr + { + syn68k_addr_t afterwards(syn68k_addr_t ret) + { + Loc::set(LM(MemErr)); + return ret; + } + }; + template struct ReturnMemErrConditional + { + syn68k_addr_t afterwards(syn68k_addr_t ret) + { + auto err = LM(MemErr); + if(err < 0) + Loc::set(err); + return ret; + } + }; + } + +# #### + +- function: + name: NewEmptyHandle + return: Handle + args: + - name: sys_p + type: bool + register: TrapBit + executor: _NewEmptyHandle_flags + trap: 0xA166 + returnreg: A0 + variants: + - NewEmptyHandle + - NewEmptyHandleSys + executor_extras: callconv::ReturnMemErr + +# #### + +- function: + name: NewHandle + return: Handle + args: + - name: size + type: Size + register: D0 + - name: sys_p + type: bool + register: TrapBit + - name: clear_p + type: bool + register: TrapBit + executor: _NewHandle_flags + trap: 0xA122 + returnreg: A0 + variants: + - NewHandle + - NewHandleClear + - NewHandleSys + - NewHandleSysClear + executor_extras: callconv::ReturnMemErr + +# #### + +- function: + name: RecoverHandle + return: Handle + args: + - name: p + type: Ptr + register: A0 + - name: sys_p + type: bool + register: TrapBit + executor: _RecoverHandle_flags + trap: 0xA128 + returnreg: A0 + variants: + - RecoverHandle + - RecoverHandleSys + executor_extras: callconv::ReturnMemErr + +# #### + +- function: + name: NewPtr + return: Ptr + args: + - name: size + type: Size + register: D0 + - name: sys_p + type: bool + register: TrapBit + - name: clear_p + type: bool + register: TrapBit + executor: _NewPtr_flags + trap: 0xA11E + returnreg: A0 + variants: + - NewPtr + - NewPtrClear + - NewPtrSys + - NewPtrSysClear + executor_extras: callconv::ReturnMemErr + +# #### + +- function: + name: FreeMem + return: int32_t + args: + - name: sys_p + type: bool + register: TrapBit + executor: _FreeMem_flags + trap: 0xA01C + returnreg: D0 + variants: + - FreeMem + - FreeMemSys + +# #### + +- function: + name: MaxMem + return: Size + args: + - name: growp + type: Size* + register: Out + - name: sys_p + type: bool + register: TrapBit + executor: _MaxMem_flags + trap: 0xA11D + returnreg: D0 + variants: + - MaxMem + - MaxMemSys + +# #### + +- function: + name: CompactMem + return: Size + args: + - name: sizeneeded + type: Size + register: D0 + - name: sys_p + type: bool + register: TrapBit + executor: _CompactMem_flags + trap: 0xA04C + returnreg: D0 + variants: + - CompactMem + - CompactMemSys + +# #### + +- function: + name: ReserveMem + args: + - name: needed + type: Size + register: D0 + - name: sys_p + type: bool + register: TrapBit + executor: _ResrvMem_flags + trap: 0xA040 + variants: + - ReserveMem + - ReserveMemSys + executor_extras: callconv::ReturnMemErr + +# #### + +- function: + name: PurgeMem + args: + - name: needed + type: Size + register: D0 + - name: sys_p + type: bool + register: TrapBit + executor: _PurgeMem_flags + trap: 0xA04D + variants: + - PurgeMem + - PurgeMemSys + executor_extras: callconv::ReturnMemErr + +# #### + +- function: + name: MaxBlock + return: Size + args: + - name: sys_p + type: bool + register: TrapBit + executor: _MaxBlock_flags + trap: 0xA061 + returnreg: D0 + variants: + - MaxBlock + - MaxBlockSys + +# #### + +- function: + name: PurgeSpace + args: + - name: totalp + type: Size* + register: Out + - name: contigp + type: Size* + register: Out + - name: sys_p + type: bool + register: TrapBit + executor: _PurgeSpace_flags + trap: 0xA062 + variants: + - PurgeSpace + - PurgeSpaceSys + +# #### + +- function: + name: MemError + return: OSErr + inline: "*(INTEGER *)0x0220" + executor: C_ + +# #### + +- function: + name: HGetState + return: SignedByte + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA069 + returnreg: D0 + +# #### + +- function: + name: HSetState + args: + - name: h + type: Handle + register: A0 + - name: flags + type: SignedByte + register: D0 + executor: true + trap: 0xA06A + executor_extras: ReturnMemErr + +# #### + +- function: + name: HLock + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA029 + executor_extras: ReturnMemErr + +# #### + +- function: + name: HUnlock + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA02A + executor_extras: ReturnMemErr + +# #### + +- function: + name: HPurge + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA049 + executor_extras: ReturnMemErr + +# #### + +- function: + name: HNoPurge + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA04A + executor_extras: ReturnMemErr + +# #### + +- function: + name: HSetRBit + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA067 + executor_extras: ReturnMemErr + +# #### + +- function: + name: HClrRBit + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA068 + executor_extras: ReturnMemErr + +# #### + +- function: + name: InitApplZone + executor: true + trap: 0xA02C + executor_extras: ReturnMemErr + +# #### + +- function: + name: SetApplBase + args: + - name: newbase + type: Ptr + register: A0 + executor: true + trap: 0xA057 + executor_extras: ReturnMemErr + +# #### + +- function: + name: MoreMasters + executor: true + trap: 0xA036 + executor_extras: ReturnMemErr + +# #### + +- function: + name: InitZone + args: + - name: pGrowZone + type: GrowZoneUPP + - name: cMoreMasters + type: int16_t + - name: limitPtr + type: Ptr + - name: startPtr + type: THz + executor: true + +# #### + +- function: + name: GetZone + return: THz + executor: true + trap: 0xA11A + returnreg: A0 + executor_extras: ReturnMemErr + +# #### + +- function: + name: SetZone + args: + - name: hz + type: THz + register: A0 + executor: true + trap: 0xA01B + executor_extras: ReturnMemErr + +# #### + +- function: + name: DisposeHandle + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA023 + executor_extras: ReturnMemErr + +# #### + +- function: + name: GetHandleSize + return: Size + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA025 + returnreg: D0 + executor_extras: ReturnMemErrConditional + +# #### + +- function: + name: SetHandleSize + args: + - name: h + type: Handle + register: A0 + - name: newsize + type: Size + register: D0 + executor: true + trap: 0xA024 + executor_extras: ReturnMemErr + +# #### + +- function: + name: HandleZone + return: THz + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA126 + returnreg: A0 + executor_extras: ReturnMemErr + +# #### + +- function: + name: ReallocateHandle + args: + - name: h + type: Handle + register: A0 + - name: size + type: Size + register: D0 + executor: true + trap: 0xA027 + executor_extras: ReturnMemErr + +# #### + +- function: + name: DisposePtr + args: + - name: p + type: Ptr + register: A0 + executor: true + trap: 0xA01F + executor_extras: ReturnMemErr + +# #### + +- function: + name: GetPtrSize + return: Size + args: + - name: p + type: Ptr + register: A0 + executor: true + trap: 0xA021 + returnreg: D0 + executor_extras: ReturnMemErrConditional + +# #### + +- function: + name: SetPtrSize + args: + - name: p + type: Ptr + register: A0 + - name: newsize + type: Size + register: D0 + executor: true + trap: 0xA020 + executor_extras: ReturnMemErr + +# #### + +- function: + name: PtrZone + return: THz + args: + - name: p + type: Ptr + register: A0 + executor: true + trap: 0xA148 + returnreg: A0 + executor_extras: ReturnMemErr + +# #### + +- function: + name: BlockMove + args: + - name: src + type: const void* + register: A0 + - name: dst + type: void* + register: A1 + - name: cnt + type: Size + register: D0 + - name: flush_p + type: bool + register: TrapBit<0x200> + executor: _BlockMove_flags + trap: 0xA02E + variants: + - BlockMove + - BlockMoveData + executor_extras: ReturnMemErr + +# #### + +- function: + name: MaxApplZone + executor: true + trap: 0xA063 + executor_extras: ReturnMemErr + +# #### + +- function: + name: MoveHHi + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA064 + executor_extras: ReturnMemErr + +# #### + +- function: + name: SetApplLimit + args: + - name: newlimit + type: Ptr + register: A0 + executor: true + trap: 0xA02D + executor_extras: ReturnMemErr + +# #### + +- function: + name: SetGrowZone + args: + - name: newgz + type: GrowZoneUPP + register: A0 + executor: true + trap: 0xA04B + executor_extras: ReturnMemErr + +# #### + +- function: + name: EmptyHandle + args: + - name: h + type: Handle + register: A0 + executor: true + trap: 0xA02B + executor_extras: ReturnMemErr + +# #### + +- function: + name: HLockHi + args: + - name: h + type: Handle + executor: C_ + +# #### + +- function: + name: SystemZone + return: THz + executor: C_ + +# #### + +- function: + name: ApplicationZone + return: THz + returnreg: D0 + m68k-inline: [0x2038, 0x02aa] + +# #### + +- function: + name: StackSpace + return: Size + executor: true + trap: 0xA065 + returnreg: D0 + +# #### + +- function: + name: GetApplLimit + return: Ptr + executor: C_ + +# #### + +- function: + name: TopMem + return: Ptr + executor: C_ + +# #### + +- function: + name: GZSaveHnd + return: Handle + executor: C_ + +# #### + +- dispatcher: + name: OSDispatch + trap: 0xA88F + selector-location: StackW + +# #### + +- function: + name: TempFreeMem + return: int32_t + comment: | + temporary memory functions; see tempmem.c + dispatcher: OSDispatch + selector: 0x0018 + executor: C_ + +# #### + +- function: + name: TempMaxMem + return: Size + args: + - name: grow + type: Size* + dispatcher: OSDispatch + selector: 0x0015 + executor: C_ + +# #### + +- function: + name: TempTopMem + return: Ptr + dispatcher: OSDispatch + selector: 0x0016 + executor: C_ + +# #### + +- function: + name: TempNewHandle + return: Handle + args: + - name: logical_size + type: Size + - name: result_code + type: OSErr* + dispatcher: OSDispatch + selector: 0x001D + executor: C_ + +# #### + +- function: + name: TempHLock + args: + - name: h + type: Handle + - name: result_code + type: OSErr* + dispatcher: OSDispatch + selector: 0x001E + executor: C_ + +# #### + +- function: + name: TempHUnlock + args: + - name: h + type: Handle + - name: result_code + type: OSErr* + dispatcher: OSDispatch + selector: 0x001F + executor: C_ + +# #### + +- function: + name: TempDisposeHandle + args: + - name: h + type: Handle + - name: result_code + type: OSErr* + dispatcher: OSDispatch + selector: 0x0020 + executor: C_ diff --git a/defs/MenuMgr.yaml b/defs/MenuMgr.yaml new file mode 100644 index 0000000..5adbf50 --- /dev/null +++ b/defs/MenuMgr.yaml @@ -0,0 +1,767 @@ +- enum: + values: + - name: noMark + value: 0 + +# #### + +- enum: + values: + - name: mDrawMsg + value: 0 + - name: mChooseMsg + value: 1 + - name: mSizeMsg + value: 2 + - name: mPopUpRect + value: 3 + +# #### + +- enum: + values: + - name: textMenuProc + value: 0 + +# #### + +- struct: + name: MenuInfo + members: + - name: menuID + type: INTEGER + - name: menuWidth + type: INTEGER + - name: menuHeight + type: INTEGER + - name: menuProc + type: Handle + - name: enableFlags + type: LONGINT + - name: menuData + type: Str255 + size: 270 + +# #### + +- typedef: + name: MenuPtr + type: MenuInfo* + +# #### + +- typedef: + name: MenuHandle + type: MenuPtr* + +# #### + +- struct: + name: MCEntry + members: + - name: mctID + type: INTEGER + - name: mctItem + type: INTEGER + - name: mctRGB1 + type: RGBColor + - name: mctRGB2 + type: RGBColor + - name: mctRGB3 + type: RGBColor + - name: mctRGB4 + type: RGBColor + - name: mctReserved + type: INTEGER + size: 30 + +# #### + +- typedef: + name: MCEntryPtr + type: MCEntry* + +# #### + +- typedef: + name: MCTable + type: MCEntry[1] + +# #### + +- typedef: + name: MCTablePtr + type: MCEntry* + +# #### + +- typedef: + name: MCTableHandle + type: MCTablePtr* + +# #### + +- lowmem: + name: TopMenuItem + type: INTEGER + address: 0xA0A + comment: | + MenuMgr IMV-249 (true); + +# #### + +- lowmem: + name: AtMenuBottom + type: INTEGER + address: 0xA0C + comment: | + MenuMgr IMV-249 (true); + +# #### + +- lowmem: + name: MenuList + type: Handle + address: 0xA1C + comment: | + MenuMgr IMI-346 (true); + +# #### + +- lowmem: + name: MBarEnable + type: INTEGER + address: 0xA20 + comment: | + MenuMgr IMI-356 (true); + +# #### + +- lowmem: + name: MenuFlash + type: INTEGER + address: 0xA24 + comment: | + MenuMgr IMI-361 (true); + +# #### + +- lowmem: + name: TheMenu + type: INTEGER + address: 0xA26 + comment: | + MenuMgr IMI-357 (true); + +# #### + +- lowmem: + name: MBarHook + type: ProcPtr + address: 0xA2C + comment: | + MenuMgr IMI-356 (true); + +# #### + +- lowmem: + name: MenuHook + type: ProcPtr + address: 0xA30 + comment: | + MenuMgr IMI-356 (true); + +# #### + +- lowmem: + name: MenuDisable + type: LONGINT + address: 0xB54 + comment: | + MenuMgr IMV-249 (true); + +# #### + +- lowmem: + name: MBDFHndl + type: Handle + address: 0xB58 + comment: | + MenuMgr Private.a (true); + +# #### + +- lowmem: + name: MBSaveLoc + type: Handle + address: 0xB5C + comment: | + MenuMgr Private.a (true); + +# #### + +- lowmem: + name: MBarHeight + type: INTEGER + address: 0xBAA + comment: | + MenuMgr IMV-253 (true); + +# #### + +- lowmem: + name: MenuCInfo + type: MCTableHandle + address: 0xD50 + comment: | + QuickDraw IMV-242 (true); + +# #### + +- function: + name: DrawMenuBar + trap: 0xA937 + executor: C_ + +# #### + +- function: + name: ClearMenuBar + trap: 0xA934 + executor: C_ + +# #### + +- function: + name: InitMenus + trap: 0xA930 + executor: C_ + +# #### + +- function: + name: NewMenu + return: MenuHandle + args: + - name: mid + type: INTEGER + - name: str + type: ConstStringPtr + trap: 0xA931 + executor: C_ + +# #### + +- function: + name: CalcMenuSize + args: + - name: mh + type: MenuHandle + trap: 0xA948 + executor: C_ + +# #### + +- function: + name: GetMenu + return: MenuHandle + args: + - name: rid + type: INTEGER + trap: 0xA9BF + executor: C_ + +# #### + +- function: + name: DisposeMenu + args: + - name: mh + type: MenuHandle + trap: 0xA932 + executor: C_ + +# #### + +- function: + name: AppendMenu + args: + - name: mh + type: MenuHandle + - name: str + type: ConstStringPtr + trap: 0xA933 + executor: C_ + +# #### + +- function: + name: AppendResMenu + args: + - name: mh + type: MenuHandle + - name: restype + type: ResType + trap: 0xA94D + executor: C_ + +# #### + +- function: + name: DeleteMenuItem + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + trap: 0xA952 + executor: C_ + +# #### + +- function: + name: InsertResMenu + args: + - name: mh + type: MenuHandle + - name: restype + type: ResType + - name: after + type: INTEGER + trap: 0xA951 + executor: C_ + +# #### + +- function: + name: InsertMenuItem + args: + - name: mh + type: MenuHandle + - name: str + type: ConstStringPtr + - name: after + type: INTEGER + trap: 0xA826 + executor: C_ + +# #### + +- function: + name: InsertMenu + args: + - name: mh + type: MenuHandle + - name: before + type: INTEGER + trap: 0xA935 + executor: C_ + +# #### + +- function: + name: DeleteMenu + args: + - name: mid + type: INTEGER + trap: 0xA936 + executor: C_ + +# #### + +- function: + name: GetNewMBar + return: Handle + args: + - name: mbarid + type: INTEGER + trap: 0xA9C0 + executor: C_ + +# #### + +- function: + name: GetMenuBar + return: Handle + trap: 0xA93B + executor: C_ + +# #### + +- function: + name: SetMenuBar + args: + - name: ml + type: Handle + trap: 0xA93C + executor: C_ + +# #### + +- function: + name: HiliteMenu + args: + - name: mid + type: INTEGER + trap: 0xA938 + executor: C_ + +# #### + +- function: + name: MenuSelect + return: LONGINT + args: + - name: p + type: Point + trap: 0xA93D + executor: C_ + +# #### + +- function: + name: FlashMenuBar + args: + - name: mid + type: INTEGER + trap: 0xA94C + executor: C_ + +# #### + +- function: + name: MenuKey + return: LONGINT + args: + - name: thec + type: CharParameter + trap: 0xA93E + executor: C_ + +# #### + +- function: + name: SetMenuItemText + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: str + type: ConstStringPtr + trap: 0xA947 + executor: C_ + +# #### + +- function: + name: GetMenuItemText + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: str + type: StringPtr + trap: 0xA946 + executor: C_ + +# #### + +- function: + name: DisableItem + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + trap: 0xA93A + executor: C_ + +# #### + +- function: + name: EnableItem + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + trap: 0xA939 + executor: C_ + +# #### + +- function: + name: CheckItem + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: cflag + type: Boolean + trap: 0xA945 + executor: C_ + +# #### + +- function: + name: SetItemMark + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: mark + type: CharParameter + trap: 0xA944 + executor: C_ + +# #### + +- function: + name: GetItemMark + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: markp + type: INTEGER* + trap: 0xA943 + executor: C_ + +# #### + +- function: + name: SetItemIcon + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: icon + type: Byte + trap: 0xA940 + executor: C_ + +# #### + +- function: + name: GetItemIcon + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: iconp + type: INTEGER* + trap: 0xA93F + executor: C_ + +# #### + +- function: + name: SetItemStyle + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: style + type: INTEGER + trap: 0xA942 + executor: C_ + +# #### + +- function: + name: GetItemStyle + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: stylep + type: INTEGER* + trap: 0xA941 + executor: C_ + +# #### + +- function: + name: CountMItems + return: INTEGER + args: + - name: mh + type: MenuHandle + trap: 0xA950 + executor: C_ + +# #### + +- function: + name: GetMenuHandle + return: MenuHandle + args: + - name: mid + type: INTEGER + trap: 0xA949 + executor: C_ + +# #### + +- function: + name: SetMenuFlash + args: + - name: i + type: INTEGER + trap: 0xA94A + executor: C_ + +# #### + +- function: + name: InitProcMenu + args: + - name: mbid + type: INTEGER + trap: 0xA808 + executor: C_ + +# #### + +- function: + name: MenuChoice + return: LONGINT + trap: 0xAA66 + executor: C_ + +# #### + +- function: + name: GetItemCmd + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: cmdp + type: CharParameter* + trap: 0xA84E + executor: C_ + +# #### + +- function: + name: SetItemCmd + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: cmd + type: CharParameter + trap: 0xA84F + executor: C_ + +# #### + +- function: + name: PopUpMenuSelect + return: LONGINT + args: + - name: mh + type: MenuHandle + - name: top + type: INTEGER + - name: left + type: INTEGER + - name: item + type: INTEGER + trap: 0xA80B + executor: C_ + +# #### + +- function: + name: DeleteMCEntries + args: + - type: INTEGER + - type: INTEGER + trap: 0xAA60 + executor: C_ + +# #### + +- function: + name: GetMCInfo + return: MCTableHandle + trap: 0xAA61 + executor: C_ + +# #### + +- function: + name: SetMCInfo + args: + - type: MCTableHandle + trap: 0xAA62 + executor: C_ + +# #### + +- function: + name: DisposeMCInfo + args: + - type: MCTableHandle + trap: 0xAA63 + executor: C_ + +# #### + +- function: + name: GetMCEntry + return: MCEntryPtr + args: + - type: INTEGER + - type: INTEGER + trap: 0xAA64 + executor: C_ + +# #### + +- function: + name: SetMCEntries + args: + - type: INTEGER + - type: MCTablePtr + trap: 0xAA65 + executor: C_ + +# #### + +- function: + name: InvalMenuBar + trap: 0xA81D + executor: C_ + +# #### + +- typedef: + name: MenuRef + type: MenuHandle + +# #### + +- function: + name: CheckMenuItem + args: + - name: mh + type: MenuHandle + - name: item + type: INTEGER + - name: cflag + type: Boolean + inline: CheckItem(mh, item, cflag) diff --git a/defs/MixedMode.yaml b/defs/MixedMode.yaml new file mode 100644 index 0000000..d4b7ae7 --- /dev/null +++ b/defs/MixedMode.yaml @@ -0,0 +1,361 @@ +- typedef: + name: ISAType + type: uint8_t + +# #### + +- typedef: + name: CallingConventionType + type: uint16_t + +# #### + +- typedef: + name: ProcInfoType + type: uint32_t + +# #### + +- typedef: + name: RegisterSelectorType + type: uint16_t + +# #### + +- typedef: + name: RoutineFlagsType + type: uint16_t + +# #### + +- enum: + values: + - name: kM68kISA + value: 0 + - name: kPowerPCISA + value: 1 + +# #### + +- enum: + values: + - name: kPascalStackBased + - name: kCStackBased + - name: kRegisterBased + - name: kThinkCStackBased + value: 5 + - name: kD0DispatchedPascalStackBased + value: 8 + - name: kD0DispatchedCStackBased + value: 9 + - name: kD1DispatchedPascalStackBased + value: 12 + - name: kStackDispatchedPascalStackBased + value: 14 + - name: kSpecialCase + +# #### + +- struct: + name: PPCProcDescriptor + members: + - name: code + type: uint32_t + - name: rtoc + type: uint32_t + +# #### + +- typedef: + name: RDFlagsType + type: uint8_t + +# #### + +- struct: + name: RoutineRecord + members: + - name: procInfo + type: ProcInfoType + - name: reserved1 + type: uint8_t + - name: ISA + type: ISAType + - name: routineFlags + type: RoutineFlagsType + - name: procDescriptor + type: ProcPtr + - name: reserved2 + type: uint32_t + - name: selector + type: uint32_t + size: 20 + +# #### + +- struct: + name: RoutineDescriptor + members: + - name: goMixedModeTrap + type: uint16_t + - name: version + type: uint8_t + - name: routineDescriptorFlags + type: RDFlagsType + - name: reserved1 + type: uint32_t + - name: reserved2 + type: uint8_t + - name: selectorInfo + type: uint8_t + - name: routineCount + type: uint16_t + - name: routineRecords + type: RoutineRecord[1] + size: 32 + +# #### + +- enum: + values: + - name: MIXED_MODE_TRAP + value: 0xAAFE + +# #### + +- enum: + values: + - name: kRoutineDescriptorVersion + value: 7 + +# #### + +- enum: + values: + - name: kSelectorsAreNotIndexable + value: 0 + +# #### + +- enum: + values: + - name: kNoByteCode + - name: kOneByteCode + - name: kTwoByteCode + - name: kFourByteCode + +# #### + +- enum: + values: + - name: kCallingConventionWidth + value: 4 + +# #### + +- enum: + values: + - name: kStackParameterPhase + value: 6 + +# #### + +- enum: + values: + - name: kStackParameterWidth + value: 2 + +# #### + +- enum: + values: + - name: kResultSizeWidth + value: 2 + +# #### + +- enum: + values: + - name: kRegisterD0 + value: 0 + - name: kRegisterD1 + comment: | + 1 + - name: kRegisterD2 + comment: | + 2 + - name: kRegisterD3 + comment: | + 3 + - name: kRegisterA0 + comment: | + 4 + - name: kRegisterA1 + comment: | + 5 + - name: kRegisterA2 + comment: | + 6 + - name: kRegisterA3 + comment: | + 7 + - name: kRegisterD4 + comment: | + 8 + - name: kRegisterD5 + comment: | + 9 + - name: kRegisterD6 + comment: | + 10 + - name: kREgisterD7 + comment: | + 11 + - name: kRegisterA4 + comment: | + 12 + - name: kRegisterA5 + comment: | + 13 + - name: kRegisterA6 + comment: | + 14 + - name: kCCRegisterCBit + value: 16 + - name: kCCRegisterVBit + comment: | + 17 + - name: kCCRegisterZBit + comment: | + 18 + - name: kCCRegisterNBit + comment: | + 19 + - name: kCCRegisterXBit + comment: | + 20 + +# #### + +- typedef: + name: UniversalProcPtr + type: RoutineDescriptor* + +# #### + +- executor_only: + code: | + #define RESULT_SIZE(n) ((n) << kCallingConventionWidth) + #define STACK_ROUTINE_PARAMETER(arg, n) \ + ((n) << (kStackParameterPhase + ((arg)-1) * kStackParameterWidth)) + +# #### + +- dispatcher: + name: MixedModeDispatch + trap: 0xAA59 + selector-location: D0W + +# #### + +- function: + name: NewRoutineDescriptor + return: UniversalProcPtr + args: + - name: proc + type: ProcPtr + - name: info + type: ProcInfoType + - name: isa + type: ISAType + dispatcher: MixedModeDispatch + selector: 0x0000 + executor: C_ + +# #### + +- function: + name: DisposeRoutineDescriptor + args: + - name: ptr + type: UniversalProcPtr + dispatcher: MixedModeDispatch + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: NewFatRoutineDescriptor + return: UniversalProcPtr + args: + - name: m68k + type: ProcPtr + - name: ppc + type: ProcPtr + - name: info + type: ProcInfoType + dispatcher: MixedModeDispatch + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: SaveMixedModeState + return: OSErr + args: + - name: statep + type: void* + - name: vers + type: uint32_t + dispatcher: MixedModeDispatch + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: RestoreMixedModeState + return: OSErr + args: + - name: statep + type: void* + - name: vers + type: uint32_t + dispatcher: MixedModeDispatch + selector: 0x0004 + executor: C_ + +# #### + +- not-for: executor + function: + name: CallUniversalProc + return: LONGINT + args: + - name: theProcPtr + type: UniversalProcPtr + - name: procInfo + type: ProcInfoType + - type: ... +- only-for: executor + function: + name: CallUniversalProc + executor: C_ + comment: | + Executor's version does not declare variable arguments. + We get them directly from the PowerPC stack instead. + + return: LONGINT + args: + - name: theProcPtr + type: UniversalProcPtr + - name: procInfo + type: ProcInfoType + +# #### + +- executor_only: + code: | + extern uint32_t ModeSwitch(UniversalProcPtr theProcPtr, ProcInfoType procInfo, ISAType fromISA); diff --git a/defs/NotifyMgr.yaml b/defs/NotifyMgr.yaml new file mode 100644 index 0000000..5848126 --- /dev/null +++ b/defs/NotifyMgr.yaml @@ -0,0 +1,63 @@ +- struct: + name: NMRec + members: + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: nmFlags + type: INTEGER + - name: nmPrivate + type: LONGINT + - name: nmReserved + type: INTEGER + - name: nmMark + type: INTEGER + - name: nmIcon + type: Handle + - name: nmSound + type: Handle + - name: nmStr + type: StringPtr + - name: nmResp + type: ProcPtr + comment: | + void myresponse(NMRecPtr foo) + - name: nmRefCon + type: LONGINT + size: 36 + +# #### + +- typedef: + name: NMRecPtr + type: NMRec* + comment: | + value of -1 means remove queue element + automatically + +# #### + +- function: + name: NMInstall + return: OSErr + args: + - name: nmptr + type: NMRecPtr + register: A0 + executor: true + trap: 0xA05E + returnreg: D0 + +# #### + +- function: + name: NMRemove + return: OSErr + args: + - name: nmptr + type: NMRecPtr + register: A0 + executor: true + trap: 0xA05F + returnreg: D0 diff --git a/defs/OSEvent.yaml b/defs/OSEvent.yaml new file mode 100644 index 0000000..014f0d0 --- /dev/null +++ b/defs/OSEvent.yaml @@ -0,0 +1,462 @@ +- enum: + values: + - name: evtNotEnb + value: 1 + +# #### + +- struct: + name: EvQEl + members: + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: evtQWhat + type: INTEGER + - name: evtQMessage + type: LONGINT + - name: evtQWhen + type: LONGINT + - name: evtQWhere + type: Point + - name: evtQModifiers + type: INTEGER + size: 22 + +# #### + +- typedef: + name: EvQElPtr + type: EvQEl* + +# #### + +- enum: + values: + - name: osEvt + value: 15 + - name: SUSPENDRESUMEBITS + value: 0x01000000 + - name: SUSPEND + value: 0 << 0 + - name: RESUME + value: 1 << 0 + - name: CONVERTCLIPBOARD + value: 1 << 1 + - name: mouseMovedMessage + value: 0xFA + +# #### + +- enum: + values: + - name: SZreserved0 + value: 1 << 15 + - name: SZacceptSuspendResumeEvents + value: 1 << 14 + - name: SZreserved1 + value: 1 << 13 + - name: SZcanBackground + value: 1 << 12 + - name: SZdoesActivateOnFGSwitch + value: 1 << 11 + - name: SZonlyBackground + value: 1 << 10 + - name: SZgetFrontClicks + value: 1 << 9 + - name: SZAcceptAppDiedEvents + value: 1 << 8 + - name: SZis32BitCompatible + value: 1 << 7 + - name: SZisHighLevelEventAware + value: 1 << 6 + - name: SZlocalAndRemoveHLEvents + value: 1 << 5 + - name: SZisStationeryAware + value: 1 << 4 + - name: SZuseTextEditServices + value: 1 << 3 + - name: SZreserved2 + value: 1 << 2 + - name: SZreserved3 + value: 1 << 1 + - name: SZreserved4 + value: 1 << 0 + name: SZ_t + +# #### + +- struct: + name: SIZEResource + members: + - name: size_flags + type: int16_t + - name: preferred_size + type: int32_t + - name: minimum_size + type: int32_t + +# #### + +- executor_only: + code: | + /* executor-only struct */ + typedef struct size_info + { + int16_t size_flags; + int32_t preferred_size; + int32_t minimum_size; + bool size_resource_present_p; + bool application_p; + } size_info_t; + + extern size_info_t size_info; + +# #### + +- lowmem: + name: monkeylives + type: INTEGER + address: 0x100 + comment: | + OSEvent SysEqu.a (true-b); + +# #### + +- lowmem: + name: SysEvtMask + type: INTEGER + address: 0x144 + comment: | + OSEvent IMII-70 (true); + +# #### + +- lowmem: + name: EventQueue + type: QHdr + address: 0x14A + comment: | + OSEvent IMII-71 (true); + +# #### + +- lowmem: + name: Ticks + type: ULONGINT + address: 0x16A + comment: | + OSEvent IMI-260 (true); + +# #### + +- lowmem: + name: MBState + type: Byte + address: 0x172 + comment: | + EventMgr PegLeg (True-b); + +# #### + +- lowmem: + name: MTemp + type: Point + address: 0x828 + comment: | + QuickDraw PegLeg (True-b); + +# #### + +- lowmem: + name: MouseLocation + type: Point + address: 0x82C + comment: | + QuickDraw Vamp (true); + +# #### + +- lowmem: + name: MouseLocation2 + type: Point + address: 0x830 + comment: | + QuickDraw MacAttack (true); + +# #### + +- executor_only: + code: | + namespace callconv + { + struct D0Minus1Boolean + { + operator bool() { return EM_D0 == 0; } + + static void set(bool b) + { + EM_D0 = b ? 0 : -1; + } + + template + static void afterCall(T) {} + + }; + } + +# #### + +- function: + name: PPostEvent + return: OSErr + args: + - name: evcode + type: INTEGER + - name: evmsg + type: LONGINT + - name: qelp + type: EvQElPtr* + +# #### + +- function: + name: PostEvent + return: OSErr + args: + - name: evcode + type: INTEGER + - name: evmsg + type: LONGINT + +# #### + +- not-for: executor + function: + name: FlushEvents + args: + - name: evmask + type: INTEGER + - name: stopmask + type: INTEGER + trap: 0xA032 + m68k-inline: [0x201F, 0xA032] +- only-for: executor + function: + name: FlushEvents + args: + - name: evmask + type: INTEGER + register: D0LowWord + - name: stopmask + type: INTEGER + register: D0HighWord + trap: 0xA032 + executor_extras: ClearD0 + executor: true + +# #### + +- not-for: executor + function: + name: GetOSEvent + return: Boolean + args: + - name: evmask + type: INTEGER + register: D0 + - name: eventp + type: EventRecord* + register: A0 + trap: 0xA031 + m68k-inline: [0xA031, 0x5240] + returnreg: D0 +- only-for: executor + function: + name: GetOSEvent + return: Boolean + args: + - name: evmask + type: INTEGER + register: D0 + - name: eventp + type: EventRecord* + register: A0 + trap: 0xA031 + returnreg: D0Minus1Boolean + executor: true + +# #### + +- not-for: executor + function: + name: OSEventAvail + return: Boolean + args: + - name: evmask + type: INTEGER + register: D0 + - name: eventp + type: EventRecord* + register: A0 + trap: 0xA030 + m68k-inline: [0xA030, 0x5240] + returnreg: D0 +- only-for: executor + function: + name: OSEventAvail + return: Boolean + args: + - name: evmask + type: INTEGER + register: D0 + - name: eventp + type: EventRecord* + register: A0 + trap: 0xA030 + returnreg: D0Minus1Boolean + executor: true + +# #### + +- function: + name: SetEventMask + args: + - name: evmask + type: INTEGER + +# #### + +- function: + name: GetEvQHdr + return: QHdrPtr + +# #### + +- function: + name: geteventelem + return: EvQEl* + +# #### + +- struct: + name: TargetID + members: + - name: sessionID + type: int32_t + - name: name + type: PPCPortRec + - name: location + type: LocationNameRec + - name: recvrName + type: PPCPortRec + size: 252 + +# #### + +- typedef: + name: TargetIDPtr + type: TargetID + +# #### + +- struct: + name: HighLevelEventMsg + members: + - name: HighLevelEventMsgHeaderlength + type: int16_t + - name: version + type: int16_t + - name: reserved1 + type: int32_t + - name: theMsgEvent + type: EventRecord + - name: userRefCon + type: int32_t + - name: postingOptions + type: int32_t + - name: msgLength + type: int32_t + size: 36 + +# #### + +- typedef: + name: HighLevelEventMsgPtr + type: HighLevelEventMsg* + +# #### + +- funptr: + return: Boolean + args: + - type: Ptr + - type: HighLevelEventMsgPtr + - type: TargetID* + name: GetSpecificFilterUPP + +# #### + +- enum: + values: + - name: noOutstandingHLE + value: -607 + - name: bufferIsSmall + value: -608 + +# #### + +- function: + name: AcceptHighLevelEvent + return: OSErr + args: + - name: sender_id_return + type: TargetID* + - name: refcon_return + type: int32_t* + - name: msg_buf + type: Ptr + - name: msg_length_return + type: int32_t* + dispatcher: OSDispatch + selector: 0x0033 + executor: C_ + +# #### + +- function: + name: GetSpecificHighLevelEvent + return: Boolean + args: + - name: fn + type: GetSpecificFilterUPP + - name: data + type: Ptr + - name: err_return + type: OSErr* + dispatcher: OSDispatch + selector: 0x0045 + executor: C_ + +# #### + +- function: + name: PostHighLevelEvent + return: OSErr + args: + - name: evt + type: EventRecord* + - name: receiver_id + type: Ptr + - name: refcon + type: int32_t + - name: msg_buf + type: Ptr + - name: msg_length + type: int32_t + - name: post_options + type: int32_t + dispatcher: OSDispatch + selector: 0x0034 + executor: C_ diff --git a/defs/OSUtil.yaml b/defs/OSUtil.yaml new file mode 100644 index 0000000..882f0b9 --- /dev/null +++ b/defs/OSUtil.yaml @@ -0,0 +1,987 @@ +- enum: + values: + - name: macXLMachine + value: 0 + - name: macMachine + value: 1 + - name: UNIXMachine + value: 1127 + +# #### + +- enum: + values: + - name: clkRdErr + value: -85 + - name: clkWrErr + value: -86 + - name: prInitErr + value: -88 + - name: prWrErr + value: -87 + - name: hwParamErr + value: -502 + +# #### + +- struct: + name: SysParmType + members: + - name: valid + type: Byte + - name: aTalkA + type: Byte + - name: aTalkB + type: Byte + - name: config + type: Byte + - name: portA + type: INTEGER + - name: portB + type: INTEGER + - name: alarm + type: LONGINT + - name: font + type: INTEGER + - name: kbdPrint + type: INTEGER + - name: volClik + type: INTEGER + - name: misc + type: INTEGER + size: 20 + +# #### + +- typedef: + name: SysPPtr + type: SysParmType* + +# #### + +- enum: + values: + - name: dummyType + - name: vType + - name: ioQType + - name: drvQType + - name: evType + - name: fsQType + name: QTypes + +# #### + +- union: + name: QElem + members: + - name: vblQElem + type: VBLTask + - name: ioQElem + type: ParamBlockRec + - name: drvQElem + type: DrvQEl + - name: evQElem + type: EvQEl + - name: vcbQElem + type: VCB + size: 178 + +# #### + +- struct: + name: DateTimeRec + members: + - name: year + type: INTEGER + - name: month + type: INTEGER + - name: day + type: INTEGER + - name: hour + type: INTEGER + - name: minute + type: INTEGER + - name: second + type: INTEGER + - name: dayOfWeek + type: INTEGER + size: 14 + +# #### + +- struct: + name: SysEnvRec + members: + - name: environsVersion + type: INTEGER + - name: machineType + type: INTEGER + - name: systemVersion + type: INTEGER + - name: processor + type: INTEGER + - name: hasFPU + type: Boolean + - name: hasColorQD + type: Boolean + - name: keyBoardType + type: INTEGER + - name: atDrvrVersNum + type: INTEGER + - name: sysVRefNum + type: INTEGER + size: 16 + +# #### + +- typedef: + name: SysEnvRecPtr + type: SysEnvRec* + +# #### + +- enum: + values: + - name: curSysEnvVers + value: 2 + +# #### + +- enum: + values: + - name: envMachUnknown + value: 0 + - name: env512KE + value: 1 + - name: envMacPlus + value: 2 + - name: envSE + value: 3 + - name: envMacII + value: 4 + - name: envMac + value: -1 + - name: envXL + value: -2 + comment: | + sysEnv machine types + +# #### + +- enum: + values: + - name: envCPUUnknown + value: 0 + - name: env68000 + value: 1 + - name: env68020 + value: 3 + - name: env68030 + value: 4 + - name: env68040 + value: 5 + +# #### + +- enum: + values: + - name: envUnknownKbd + value: 0 + - name: envMacKbd + value: 1 + - name: envMacAndPad + value: 2 + - name: envMacPlusKbd + value: 3 + - name: envAExtendKbd + value: 4 + - name: envStandADBKbd + value: 5 + +# #### + +- enum: + values: + - name: envBadVers + value: -5501 + - name: envVersTooBig + value: -5502 + +# #### + +- typedef: + name: TrapType + type: SignedByte + +# #### + +- enum: + values: + - name: kOSTrapType + - name: kToolboxTrapType + +# #### + +- lowmem: + name: SysVersion + type: INTEGER + address: 0x15A + comment: | + OSUtil ThinkC (true); + +# #### + +- lowmem: + name: SPValid + type: Byte + address: 0x1F8 + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPATalkA + type: Byte + address: 0x1F9 + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPATalkB + type: Byte + address: 0x1FA + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPConfig + type: Byte + address: 0x1FB + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPPortA + type: INTEGER + address: 0x1FC + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPPortB + type: INTEGER + address: 0x1FE + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPAlarm + type: LONGINT + address: 0x200 + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPFont + type: INTEGER + address: 0x204 + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPKbd + type: Byte + address: 0x206 + comment: | + OSUtil IMII-369 (true); + +# #### + +- lowmem: + name: SPPrint + type: Byte + address: 0x207 + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPVolCtl + type: Byte + address: 0x208 + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPClikCaret + type: Byte + address: 0x209 + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: SPMisc2 + type: Byte + address: 0x20B + comment: | + OSUtil IMII-392 (true); + +# #### + +- lowmem: + name: Time + type: ULONGINT + address: 0x20C + comment: | + OSUtil IMI-260 (true); + +# #### + +- lowmem: + name: CrsrThresh + type: INTEGER + address: 0x8EC + comment: | + OSUtil IMII-372 (false); + +# #### + +- lowmem: + name: MMUType + type: Byte + address: 0xCB1 + comment: | + OSUtil MPW (false); + +# #### + +- lowmem: + name: MMU32Bit + type: Byte + address: 0xCB2 + comment: | + OSUtil IMV-592 (true-b); + +# #### + +- lowmem: + name: DTQueue + type: QHdr + address: 0xD92 + comment: | + OSUtil IMV-466 (false); + +# #### + +- lowmem: + name: JDTInstall + type: ProcPtr + address: 0xD9C + comment: | + OSUtil IMV (false); + +# #### + +- function: + name: HandToHand + return: OSErr + args: + - name: h + type: Handle* + register: InOut + executor: true + trap: 0xA9E1 + returnreg: D0 + executor_extras: SaveA1D1D2, CCFromD0 + +# #### + +- function: + name: PtrToHand + return: OSErr + args: + - name: p + type: const void* + register: A0 + - name: h + type: Handle* + register: Out + - name: s + type: LONGINT + register: D0 + executor: true + trap: 0xA9E3 + returnreg: D0 + executor_extras: SaveA1D1D2, CCFromD0 + +# #### + +- function: + name: PtrToXHand + return: OSErr + args: + - name: p + type: const void* + register: A0 + - name: h + type: Handle + register: A1 + - name: s + type: LONGINT + register: D0 + executor: true + trap: 0xA9E2 + returnreg: D0 + executor_extras: MoveA1ToA0, SaveA1D1D2, CCFromD0 + +# #### + +- function: + name: HandAndHand + return: OSErr + args: + - name: h1 + type: Handle + register: A0 + - name: h2 + type: Handle + register: A1 + executor: true + trap: 0xA9E4 + returnreg: D0 + executor_extras: MoveA1ToA0, SaveA1D1D2, CCFromD0 + +# #### + +- function: + name: PtrAndHand + return: OSErr + args: + - name: p + type: const void* + register: A0 + - name: h + type: Handle + register: A1 + - name: s1 + type: LONGINT + register: D0 + executor: true + trap: 0xA9EF + returnreg: D0 + executor_extras: MoveA1ToA0, SaveA1D1D2, CCFromD0 + +# #### + +- function: + name: ROMlib_RelString + return: LONGINT + args: + - name: s1 + type: const uint8_t* + - name: s2 + type: const uint8_t* + - name: casesig + type: Boolean + - name: diacsig + type: Boolean + - name: d0 + type: LONGINT + +# #### + +- function: + name: RelString + return: INTEGER + args: + - name: s1 + type: ConstStringPtr + - name: s2 + type: ConstStringPtr + - name: casesig + type: Boolean + - name: diacsig + type: Boolean + +# #### + +- function: + name: EqualString + return: Boolean + args: + - name: s1 + type: ConstStringPtr + - name: s2 + type: ConstStringPtr + - name: casesig + type: Boolean + - name: diacsig + type: Boolean + +# #### + +- function: + name: ROMlib_UprString + args: + - name: s + type: StringPtr + - name: diac + type: Boolean + - name: len + type: INTEGER + +# #### + +- function: + name: UpperString + args: + - name: s + type: StringPtr + - name: diac + type: Boolean + +# #### + +- function: + name: GetDateTime + args: + - name: mactimepointer + type: ULONGINT* + inline: "*(ULONGINT*)0x020C = (mactimepointer)" + +# #### + +- function: + name: ReadDateTime + return: OSErr + args: + - name: secs + type: ULONGINT* + register: A0 + executor: true + trap: 0xA039 + returnreg: D0 + +# #### + +- function: + name: SetDateTime + return: OSErr + args: + - name: mactime + type: ULONGINT + register: D0 + executor: true + trap: 0xA03A + returnreg: D0 + +# #### + +- function: + name: DateToSeconds + args: + - name: d + type: DateTimeRec* + register: A0 + - name: s + type: ULONGINT* + register: Out + executor: true + trap: 0xA9C7 + executor_extras: SaveA1D1D2 + +# #### + +- function: + name: SecondsToDate + args: + - name: mactime + type: ULONGINT + register: D0 + - name: d + type: DateTimeRec* + register: A0 + executor: true + trap: 0xA9C6 + executor_extras: SaveA1D1D2 + +# #### + +- function: + name: GetTime + args: + - name: d + type: DateTimeRec* + +# #### + +- function: + name: SetTime + args: + - name: d + type: DateTimeRec* + +# #### + +- function: + name: InitUtil + return: OSErr + executor: true + trap: 0xA03F + returnreg: D0 + +# #### + +- function: + name: GetSysPPtr + return: SysPPtr + +# #### + +- function: + name: WriteParam + return: OSErr + executor: true + trap: 0xA038 + returnreg: D0 + +# #### + +- function: + name: Enqueue + args: + - name: e + type: QElemPtr + register: A0 + - name: h + type: QHdrPtr + register: A1 + executor: true + trap: 0xA96F + executor_extras: SaveA1D1D2 + +# #### + +- function: + name: Dequeue + return: OSErr + args: + - name: e + type: QElemPtr + register: A0 + - name: h + type: QHdrPtr + register: A1 + executor: true + trap: 0xA96E + returnreg: D0 + executor_extras: SaveA1D1D2 + +# #### + +- function: + name: NGetTrapAddress + return: ProcPtr + args: + - name: n + type: uint16_t + - name: ttype + type: TrapType + comment: | + extern LONGINT GetTrapAddress(INTEGER n); // 68K in emustubs, not supported on ppc + extern void SetTrapAddress(LONGINT addr, + INTEGER n); + executor: C_ + +# #### + +- function: + name: NSetTrapAddress + args: + - name: addr + type: ProcPtr + - name: n + type: uint16_t + - name: ttype + type: TrapType + executor: C_ + +# #### + +- function: + name: GetTrapAddress + return: ProcPtr + args: + - name: n + type: uint16_t + register: D0 + - name: newTraps + type: bool + register: TrapBit<0x200> + - name: tool + type: bool + register: TrapBit<0x400> + executor: _GetTrapAddress_flags + trap: 0xA146 + returnreg: A0 + variants: + - GetTrapAddress + - INVALID_GetTrapAddress + - GetOSTrapAddress + - GetToolTrapAddress + executor_extras: ClearD0 + +# #### + +- function: + name: SetTrapAddress + args: + - name: addr + type: ProcPtr + register: A0 + - name: n + type: uint16_t + register: D0 + - name: newTraps + type: bool + register: TrapBit<0x200> + - name: tool + type: bool + register: TrapBit<0x400> + executor: _SetTrapAddress_flags + trap: 0xA047 + variants: + - SetTrapAddress + - INVALID_SetTrapAddress + - SetOSTrapAddress + - SetToolTrapAddress + executor_extras: ClearD0 + +# #### + +- function: + name: GetToolboxTrapAddress + return: ProcPtr + args: + - name: n + type: uint16_t + inline: GetToolTrapAddress(n) + executor: C_ + +# #### + +- function: + name: SetToolboxTrapAddress + args: + - name: addr + type: ProcPtr + - name: n + type: uint16_t + inline: SetToolTrapAddress(addr,n) + executor: C_ + +# #### + +- enum: + values: + - name: _Unimplemented + value: 0xA89F + +# #### + +- function: + name: Delay + args: + - name: n + type: LONGINT + register: A0 + - name: ftp + type: LONGINT* + register: Out + executor: true + trap: 0xA03B + +# #### + +- function: + name: SysBeep + args: + - name: i + type: INTEGER + trap: 0xA9C8 + executor: C_ + +# #### + +- function: + name: Environs + args: + - name: rom + type: INTEGER* + - name: machine + type: INTEGER* + +# #### + +- function: + name: SysEnvirons + return: OSErr + args: + - name: vers + type: INTEGER + register: D0 + - name: p + type: SysEnvRecPtr + register: A0 + executor: true + trap: 0xA090 + returnreg: D0 + +# #### + +- function: + name: Restart + +# #### + +- function: + name: SetUpA5 + +# #### + +- function: + name: RestoreA5 + +# #### + +- executor_only: + code: | + #undef GetMMUMode + #undef SwapMMUMode + +# #### + +- function: + name: GetMMUMode + return: Byte + +# #### + +- function: + name: SwapMMUMode + args: + - name: bp + type: Byte* + +# #### + +- only-for: executor + function: + name: StripAddress + return: uint32_t + args: + - name: l + type: uint32_t + register: D0 + trap: 0xA055 + returnreg: D0 + executor: true +- not-for: executor + function: + name: StripAddress + return: Ptr + args: + - name: p + type: Ptr + register: D0 + trap: 0xA055 + returnreg: D0 + +# #### + +- function: + name: DebugStr + args: + - name: p + type: ConstStringPtr + trap: 0xABFF + executor: C_ + +# #### + +- function: + name: Debugger + trap: 0xA9FF + executor: C_ + +# #### + +- function: + name: MakeDataExecutable + args: + - name: ptr + type: void* + - name: sz + type: uint32_t + executor: C_ + +# #### + +- function: + name: FlushCodeCache + trap: 0xA0BD + executor: C_ + +# #### + +- function: + name: HWPriv + args: + - name: d0 + type: LONGINT + register: D0 + - name: a0 + type: LONGINT + register: A0 + executor: true + trap: 0xA198 + +# #### + +- function: + name: SetCurrentA5 + return: LONGINT + returnreg: D0 + m68k-inline: [0x200D, 0x2A78, 0x0904] + +# #### + +- function: + name: SetA5 + return: LONGINT + returnreg: D0 + args: + - name: a5 + type: LONGINT + register: D0 + m68k-inline: [0xC18D] diff --git a/defs/PEFBinaryFormat.yaml b/defs/PEFBinaryFormat.yaml new file mode 100644 index 0000000..12039c7 --- /dev/null +++ b/defs/PEFBinaryFormat.yaml @@ -0,0 +1,426 @@ +- enum: + values: + - name: kPEFTag1 + value: "'Joy!'" + - name: kPEFTag2 + value: "'peff'" + - name: kPEFVersion + value: 1 + +# #### + +- enum: + values: + - name: kPEFProcessShare + value: 1 + - name: kPEFGlobalShare + value: 4 + - name: kPEFProtectedShare + value: 5 + +# #### + +- enum: + values: + - name: kPEFCodeSection + value: 0 + - name: kPEFUnpackedDataSection + - name: kPEFPatternDataSection + - name: kPEFConstantSection + - name: kPEFLoaderSection + - name: kPEFDebugSection + - name: kPEFExecutableDataSection + - name: kPEFExceptionSection + - name: kPEFTracebackSection + +# #### + +- enum: + values: + - name: kPEFCodeSymbol + - name: kPEFDataSymbol + - name: kPEFTVectorSymbol + - name: kPEFTOCSymbol + - name: kPEFGlueSymbol + +# #### + +- enum: + values: + - name: kPEFWeakImportLibMask + value: 0x40 + - name: kPEFInitLibBeforeMask + value: 0x80 + comment: | + flags for PEFImportedLibrary::options + +# #### + +- struct: + name: PEFContainerHeader + members: + - name: tag1 + type: OSType + - name: tag2 + type: OSType + - name: architecture + type: OSType + - name: formatVersion + type: uint32_t + - name: dateTimeStamp + type: uint32_t + - name: oldDefVersion + type: uint32_t + - name: oldImpVersion + type: uint32_t + - name: currentVersion + type: uint32_t + - name: sectionCount + type: uint16_t + - name: instSectionCount + type: uint16_t + - name: reservedA + type: uint32_t + size: 40 + +# #### + +- executor_only: + code: | + #define PEF_CONTAINER_TAG1(p) ((p)->tag1) + #define PEF_CONTAINER_TAG2(p) ((p)->tag2) + #define PEF_CONTAINER_ARCHITECTURE(p) ((p)->architecture) + #define PEF_CONTAINER_FORMAT_VERSION(p) ((p)->formatVersion) + #define PEF_CONTAINER_SECTION_COUNT(p) ((p)->sectionCount) + #define PEF_CONTAINER_INSTSECTION_COUNT(p) ((p)->instSectionCount) + #define PEF_CONTAINER_DATE(p) ((p)->dateTimeStamp) + #define PEF_CONTAINER_OLD_DEV_VERS(p) ((p)->oldDefVersion) + #define PEF_CONTAINER_OLD_IMP_VERS(p) ((p)->oldImpVersion) + #define PEF_CONTAINER_CURRENT_VERS(p) ((p)->currentVersion) + +# #### + +- enum: + values: + - name: kPEFFirstSectionHeaderOffset + value: sizeof(PEFContainerHeader) + +# #### + +- struct: + name: PEFSectionHeader + members: + - name: nameOffset + type: int32_t + - name: defaultAddress + type: uint32_t + - name: totalLength + type: uint32_t + - name: unpackedLength + type: uint32_t + - name: containerLength + type: uint32_t + - name: containerOffset + type: uint32_t + - name: sectionKind + type: uint8_t + - name: shareKind + type: uint8_t + - name: alignment + type: uint8_t + - name: reservedA + type: uint8_t + size: 28 + +# #### + +- executor_only: + code: | + #define PEFSH_DEFAULT_ADDRESS(p) ((p)->defaultAddress) + #define PEFSH_TOTAL_SIZE(p) ((p)->totalLength) + #define PEFSH_UNPACKED_SIZE(p) ((p)->unpackedLength) + #define PEFSH_PACKED_SIZE(p) ((p)->containerLength) + #define PEFSH_CONTAINER_OFFSET(p) ((p)->containerOffset) + #define PEFSH_SECTION_KIND(p) ((p)->sectionKind) + #define PEFSH_SHARE_KIND(p) ((p)->shareKind) + #define PEFSH_ALIGNMENT(p) (1 << (p)->alignment) + +# #### + +- struct: + name: PEFLoaderInfoHeader + members: + - name: mainSection + type: int32_t + - name: mainOffset + type: uint32_t + - name: initSection + type: int32_t + - name: initOffset + type: uint32_t + - name: termSection + type: int32_t + - name: termOffset + type: uint32_t + - name: importedLibraryCount + type: uint32_t + - name: totalImportedSymbolCount + type: uint32_t + - name: relocSectionCount + type: uint32_t + - name: relocInstrOffset + type: uint32_t + - name: loaderStringsOffset + type: uint32_t + - name: exportHashOffset + type: uint32_t + - name: exportHashTablePower + type: uint32_t + - name: exportedSymbolCount + type: uint32_t + size: 56 + +# #### + +- executor_only: + code: | + #define PEFLIH_MAIN_SECTION(p) ((p)->mainSection) + #define PEFLIH_MAIN_OFFSET(p) ((p)->mainOffset) + #define PEFLIH_INIT_SECTION(p) ((p)->initSection) + #define PEFLIH_INIT_OFFSET(p) ((p)->initOffset) + #define PEFLIH_TERM_SECTION(p) ((p)->termSection) + #define PEFLIH_TERM_OFFSET(p) ((p)->termOffset) + #define PEFLIH_IMPORTED_LIBRARY_COUNT(p) ((p)->importedLibraryCount) + #define PEFLIH_IMPORTED_SYMBOL_COUNT(p) ((p)->totalImportedSymbolCount) + #define PEFLIH_RELOC_SECTION_COUNT(p) ((p)->relocSectionCount) + #define PEFLIH_RELOC_INSTR_OFFSET(p) ((p)->relocInstrOffset) + #define PEFLIH_STRINGS_OFFSET(p) ((p)->loaderStringsOffset) + #define PEFLIH_HASH_OFFSET(p) ((p)->exportHashOffset) + #define PEFLIH_HASH_TABLE_POWER(p) ((p)->exportHashTablePower) + #define PEFLIH_SYMBOL_COUNT(p) ((p)->exportedSymbolCount) + +# #### + +- struct: + name: PEFImportedLibrary + members: + - name: nameOffset + type: uint32_t + - name: oldImpVersion + type: uint32_t + - name: currentVersion + type: uint32_t + - name: importedSymbolCount + type: uint32_t + - name: firstImportedSymbol + type: uint32_t + - name: options + type: uint8_t + - name: reservedA + type: uint8_t + - name: reservedB + type: uint16_t + size: 24 + +# #### + +- executor_only: + code: | + #define PEFIL_NAME_OFFSET(p) ((p)->nameOffset) + #define PEFIL_SYMBOL_COUNT(p) ((p)->importedSymbolCount) + #define PEFIL_FIRST_SYMBOL(p) ((p)->firstImportedSymbol) + +# #### + +- struct: + name: PEFLoaderRelocationHeader + members: + - name: sectionIndex + type: uint16_t + - name: reservedA + type: uint16_t + - name: relocCount + type: uint32_t + - name: firstRelocOffset + type: uint32_t + size: 12 + +# #### + +- executor_only: + code: | + #define PEFRLH_RELOC_COUNT(p) ((p)->relocCount) + #define PEFRLH_FIRST_RELOC_OFFSET(p) ((p)->firstRelocOffset) + #define PEFRLH_SECTION_INDEX(p) ((p)->sectionIndex) + +# #### + +- enum: + values: + - name: kExponentLimit + value: 16 + - name: kAverageChainLimit + value: 10 + +# #### + +- enum: + values: + - name: kPEFHashLengthShift + value: 16 + - name: kPEFHashValueMask + value: 0xFFFF + +# #### + +- enum: + values: + - name: FIRST_INDEX_SHIFT + value: 0 + - name: FIRST_INDEX_MASK + value: 0x3FFFF + - name: CHAIN_COUNT_SHIFT + value: 18 + - name: CHAIN_COUNT_MASK + value: 0x3FFF + +# #### + +- struct: + name: PEFExportedSymbol + members: + - name: classAndName + type: uint32_t + - name: symbolValue + type: uint32_t + - name: sectionIndex + type: int16_t + size: 10 + +# #### + +- executor_only: + code: | + #define PEFEXS_CLASS_AND_NAME(p) ((p)->classAndName) + #define PEFEXS_NAME(p) (PEFEXS_CLASS_AND_NAME(p) & 0xffffff) + #define PEFEXS_SYMBOL_VALUE(p) ((p)->symbolValue) + #define PEFEXS_SECTION_INDEX(p) ((p)->sectionIndex) + +# #### + +- struct: + name: PEFImportedSymbol + members: + - name: classAndName + type: uint32_t + +# #### + +- typedef: + name: PEFExportedSymbolKey + type: uint32_t + +# #### + +- typedef: + name: PEFExportedSymbolHashSlot + type: uint32_t + +# #### + +- enum: + values: + - name: NAME_MASK + value: 0xFFFFFF + +# #### + +- function: + name: PEFExportedSymbolClass + return: uint32_t + args: + - name: classAndName + type: uint32_t + inline: ((classAndName) >> 24) & 0xFF + +# #### + +- function: + name: PEFExportedSymbolNameOffset + return: uint32_t + args: + - name: classAndName + type: uint32_t + inline: (classAndName) & 0xFFFFFF + +# #### + +- function: + name: PEFComposeImportedSymbol + return: uint32_t + args: + - name: cls + type: uint32_t + - name: nameOffset + type: uint32_t + inline: (((uint32_t)cls) << 24) | (uint32_t)(nameOffset) + +# #### + +- function: + name: PEFRelocComposeBySectC + return: uint16_t + args: + - name: runLength + type: uint16_t + inline: 0x4000 | ((uint16_t)(runLength) - 1) + +# #### + +- function: + name: PEFRelocComposeBySectD + return: uint16_t + args: + - name: runLength + type: uint16_t + inline: 0x4200 | ((uint16_t)(runLength) - 1) + +# #### + +- function: + name: PEFRelocComposeSetPosition_1st + return: uint16_t + args: + - name: fullOffset + type: uint32_t + inline: 0xA000 | (uint16_t)((uint32_t)(fullOffset) >> 16) + +# #### + +- function: + name: PEFRelocComposeSetPosition_2nd + return: uint16_t + args: + - name: fullOffset + type: uint32_t + inline: (uint16_t) ((uint32_t)(fullOffset)) + +# #### + +- function: + name: PEFRelocComposeLgByImport_1st + return: uint16_t + args: + - name: fullIndex + type: uint32_t + inline: 0xA400 | (uint16_t)((uint32_t)(fullIndex) >> 16) + +# #### + +- function: + name: PEFRelocComposeLgByImport_2nd + return: uint16_t + args: + - name: fullIndex + type: uint32_t + inline: (uint16_t) ((uint32_t)(fullIndex)) diff --git a/defs/PPC.yaml b/defs/PPC.yaml new file mode 100644 index 0000000..3c21eee --- /dev/null +++ b/defs/PPC.yaml @@ -0,0 +1,89 @@ +- typedef: + name: PPCPortKinds + type: int16_t + +# #### + +- typedef: + name: PPCLocationKind + type: int16_t + +# #### + +- struct: + name: EntityName + members: + - name: objStr + type: Str32 + - name: typeStr + type: Str32 + - name: zoneStr + type: Str32 + +# #### + +- struct: + name: PPCXTIAddress + members: + - name: fAddressType + type: int16_t + - name: fAddress + type: uint8_t[96] + +# #### + +- struct: + name: PPCAddrRec + members: + - name: Reserved + type: uint8_t[3] + - name: xtiAddrLen + type: uint8_t + - name: xtiAddr + type: PPCXTIAddress + +# #### + +- struct: + name: LocationNameRec + members: + - name: locationKindSelector + type: PPCLocationKind + - name: u + union: + - name: npbEntity + type: EntityName + - name: npbType + type: Str32 + - name: xtiType + type: PPCAddrRec + size: 104 + +# #### + +- struct: + name: PPCPortRec + members: + - name: nameScript + type: ScriptCode + - name: name + type: Str32 + - name: portKindsSelector + type: PPCPortKinds + - name: u + union: + - name: portTypeStr + type: Str32 + - name: port + struct: + - name: creator + type: OSType + - name: type + type: OSType + size: 72 + +# #### + +- typedef: + name: PPCPortPtr + type: PPCPortRec* diff --git a/defs/Package.yaml b/defs/Package.yaml new file mode 100644 index 0000000..4977211 --- /dev/null +++ b/defs/Package.yaml @@ -0,0 +1,46 @@ +- enum: + values: + - name: dskInit + value: 2 + - name: stdFile + value: 3 + - name: flPoint + value: 4 + - name: trFunc + value: 5 + - name: intUtil + value: 6 + - name: bdConv + value: 7 + +# #### + +- lowmem: + name: AppPacks + type: Handle[8] + address: 0xAB8 + comment: | + PackageMgr ThinkC (true-b); + +# #### + +- function: + name: InitPack + args: + - name: packid + type: INTEGER + trap: 0xA9E5 + executor: C_ + +# #### + +- function: + name: InitAllPacks + trap: 0xA9E6 + executor: C_ + +# #### + +- executor_only: + code: | + RAW_68K_TRAP(Pack1, 0xA9E8); diff --git a/defs/PrintMgr.yaml b/defs/PrintMgr.yaml new file mode 100644 index 0000000..085f0cc --- /dev/null +++ b/defs/PrintMgr.yaml @@ -0,0 +1,594 @@ +- enum: + values: + - name: bDraftLoop + value: 0 + - name: bSpoolLoop + value: 1 + +# #### + +- enum: + values: + - name: bDevCItoh + value: 1 + - name: bDevLaser + value: 3 + +# #### + +- enum: + values: + - name: iPFMaxPgs + value: 128 + +# #### + +- enum: + values: + - name: iPrSavPFil + value: -1 + - name: iIOAbort + value: -27 + - name: MemFullErr + value: -108 + - name: iPrAbort + value: 128 + +# #### + +- enum: + values: + - name: iPrDevCtl + value: 7 + - name: lPrReset + value: 0x10000 + - name: lPrLineFeed + value: 0x30000 + - name: lPrLFSixth + value: 0x3FFFF + - name: lPrPageEnd + value: 0x20000 + - name: iPrBitsCtl + value: 4 + - name: lScreenBits + value: 0 + - name: lPaintBits + value: 1 + - name: iPrIOCtl + value: 5 + +# #### + +- executor_only: + code: | + const char *const sPrDrvr = ".Print"; + +# #### + +- enum: + values: + - name: iPrDrvrRef + value: -3 + +# #### + +- struct: + name: TPrPort + members: + - name: gPort + type: GrafPort + - name: saveprocs + type: QDProcs + - name: spare + type: LONGINT[4] + - name: fOurPtr + type: Boolean + - name: fOurBits + type: Boolean + size: 178 + +# #### + +- typedef: + name: TPPrPort + type: TPrPort* + +# #### + +- struct: + name: TPrInfo + members: + - name: iDev + type: INTEGER + - name: iVRes + type: INTEGER + - name: iHRes + type: INTEGER + - name: rPage + type: Rect + size: 14 + +# #### + +- enum: + values: + - name: feedCut + - name: feedFanFold + - name: feedMechCut + - name: feedOther + name: TFeed + +# #### + +- struct: + name: TPrStl + members: + - name: wDev + type: INTEGER + - name: iPageV + type: INTEGER + - name: iPageH + type: INTEGER + - name: bPort + type: SignedByte + - name: feed + type: char + size: 8 + +# #### + +- enum: + values: + - name: scanTB + - name: scanBL + - name: scanLR + - name: scanRL + name: TScan + +# #### + +- struct: + name: TPrXInfo + members: + - name: iRowBytes + type: INTEGER + - name: iBandV + type: INTEGER + - name: iBandH + type: INTEGER + - name: iDevBytes + type: INTEGER + - name: iBands + type: INTEGER + - name: bPatScale + type: SignedByte + - name: bULThick + type: SignedByte + - name: bULOffset + type: SignedByte + - name: bULShadow + type: SignedByte + - name: scan + type: char + - name: bXInfoX + type: SignedByte + size: 16 + +# #### + +- struct: + name: TPrJob + members: + - name: iFstPage + type: INTEGER + - name: iLstPage + type: INTEGER + - name: iCopies + type: INTEGER + - name: bJDocLoop + type: SignedByte + - name: fFromUsr + type: Boolean + - name: pIdleProc + type: ProcPtr + - name: pFileName + type: StringPtr + - name: iFileVol + type: INTEGER + - name: bFileVers + type: SignedByte + - name: bJobX + type: SignedByte + size: 20 + +# #### + +- struct: + name: TPrint + members: + - name: iPrVersion + type: INTEGER + - name: prInfo + type: TPrInfo + - name: rPaper + type: Rect + - name: prStl + type: TPrStl + - name: prInfoPT + type: TPrInfo + - name: prXInfo + type: TPrXInfo + - name: prJob + type: TPrJob + - name: printX + type: INTEGER[19] + size: 120 + +# #### + +- typedef: + name: TPPrint + type: TPrint* + +# #### + +- typedef: + name: THPrint + type: TPPrint* + +# #### + +- typedef: + name: TPRect + type: Rect* + +# #### + +- struct: + name: TPrStatus + members: + - name: iTotPages + type: INTEGER + - name: iCurPage + type: INTEGER + - name: iTotCopies + type: INTEGER + - name: iCurCopy + type: INTEGER + - name: iTotBands + type: INTEGER + - name: iCurBand + type: INTEGER + - name: fPgDirty + type: Boolean + - name: fImaging + type: Boolean + - name: hPrint + type: THPrint + - name: pPRPort + type: TPPrPort + - name: hPic + type: PicHandle + size: 26 + +# #### + +- struct: + name: TPrDlg + members: + - name: dlg + type: DialogRecord + - name: pFltrProc + type: ModalFilterUPP + - name: pItemProc + type: UserItemUPP + - name: hPrintUsr + type: THPrint + - name: fDoIt + type: Boolean + - name: fDone + type: Boolean + - name: lUser1 + type: LONGINT + - name: lUser2 + type: LONGINT + - name: lUser3 + type: LONGINT + - name: lUser4 + type: LONGINT + - name: iNumFst + type: INTEGER + - name: iNumLst + type: INTEGER + size: 204 + +# #### + +- typedef: + name: TPPrDlg + type: TPrDlg* + comment: | + From Technote 095 + more stuff may be here + +# #### + +- lowmem: + name: PrintErr + type: INTEGER + address: 0x944 + comment: | + PrintMgr IMII-161 (true-b); + +# #### + +- dispatcher: + name: PrGlue + trap: 0xA8FD + selector-location: StackL + +# #### + +- function: + name: PrError + return: INTEGER + dispatcher: PrGlue + selector: 0xBA000000 + executor: C_ + +# #### + +- function: + name: PrSetError + args: + - name: iErr + type: INTEGER + dispatcher: PrGlue + selector: 0xC0000200 + executor: C_ + +# #### + +- function: + name: PrOpen + dispatcher: PrGlue + selector: 0xC8000000 + executor: C_ + +# #### + +- function: + name: PrClose + dispatcher: PrGlue + selector: 0xD0000000 + executor: C_ + +# #### + +- function: + name: PrDrvrOpen + dispatcher: PrGlue + selector: 0x80000000 + executor: C_ + +# #### + +- function: + name: PrDrvrClose + dispatcher: PrGlue + selector: 0x88000000 + executor: C_ + +# #### + +- function: + name: PrCtlCall + args: + - name: iWhichCtl + type: INTEGER + - name: lParam1 + type: LONGINT + - name: lParam2 + type: LONGINT + - name: lParam3 + type: LONGINT + dispatcher: PrGlue + selector: 0xA0000E00 + executor: C_ + +# #### + +- function: + name: PrDrvrDCE + return: Handle + dispatcher: PrGlue + selector: 0x94000000 + executor: C_ + +# #### + +- function: + name: PrDrvrVers + return: INTEGER + dispatcher: PrGlue + selector: 0x9A000000 + executor: C_ + +# #### + +- function: + name: PrJobInit + return: TPPrDlg + args: + - name: hPrint + type: THPrint + dispatcher: PrGlue + selector: 0x44040410 + executor: C_ + +# #### + +- function: + name: PrStlInit + return: TPPrDlg + args: + - name: hPrint + type: THPrint + dispatcher: PrGlue + selector: 0x3C04040C + executor: C_ + +# #### + +- function: + name: PrDlgMain + return: Boolean + args: + - name: hPrint + type: THPrint + - name: initfptr + type: ProcPtr + dispatcher: PrGlue + selector: 0x4A040894 + executor: C_ + +# #### + +- function: + name: PrGeneral + args: + - name: pData + type: Ptr + dispatcher: PrGlue + selector: 0x70070480 + executor: C_ + +# #### + +- function: + name: PrOpenDoc + return: TPPrPort + args: + - name: hPrint + type: THPrint + - name: port + type: TPPrPort + - name: pIOBuf + type: Ptr + dispatcher: PrGlue + selector: 0x04000C00 + executor: C_ + +# #### + +- function: + name: PrOpenPage + args: + - name: port + type: TPPrPort + - name: pPageFrame + type: TPRect + dispatcher: PrGlue + selector: 0x10000808 + executor: C_ + +# #### + +- function: + name: PrClosePage + args: + - name: pPrPort + type: TPPrPort + dispatcher: PrGlue + selector: 0x1800040C + executor: C_ + +# #### + +- function: + name: PrCloseDoc + args: + - name: port + type: TPPrPort + dispatcher: PrGlue + selector: 0x08000484 + executor: C_ + +# #### + +- function: + name: PrPicFile + args: + - name: hPrint + type: THPrint + - name: pPrPort + type: TPPrPort + - name: pIOBuf + type: Ptr + - name: pDevBuf + type: Ptr + - name: prStatus + type: TPrStatus* + dispatcher: PrGlue + selector: 0x60051480 + executor: C_ + +# #### + +- function: + name: PrintDefault + args: + - name: hPrint + type: THPrint + dispatcher: PrGlue + selector: 0x20040480 + executor: C_ + +# #### + +- function: + name: PrValidate + return: Boolean + args: + - name: hPrint + type: THPrint + dispatcher: PrGlue + selector: 0x52040498 + executor: C_ + +# #### + +- function: + name: PrStlDialog + return: Boolean + args: + - name: hPrint + type: THPrint + dispatcher: PrGlue + selector: 0x2A040484 + executor: C_ + +# #### + +- function: + name: PrJobDialog + return: Boolean + args: + - name: hPrint + type: THPrint + dispatcher: PrGlue + selector: 0x32040488 + executor: C_ + +# #### + +- function: + name: PrJobMerge + args: + - name: hPrintSrc + type: THPrint + - name: hPrintDst + type: THPrint + dispatcher: PrGlue + selector: 0x5804089C + executor: C_ diff --git a/defs/ProcessMgr.yaml b/defs/ProcessMgr.yaml new file mode 100644 index 0000000..f4460f0 --- /dev/null +++ b/defs/ProcessMgr.yaml @@ -0,0 +1,324 @@ +- typedef: + name: LaunchFlags + type: INTEGER + +# #### + +- struct: + name: ProcessSerialNumber + members: + - name: highLongOfPSN + type: uint32_t + - name: lowLongOfPSN + type: uint32_t + size: 8 + +# #### + +- struct: + members: + - name: magic + type: uint32_t + - name: n_fsspec + type: INTEGER + - name: fsspec + type: FSSpec[0] + name: ROMlib_AppParameters_t + +# #### + +- enum: + values: + - name: APP_PARAMS_MAGIC + value: 0xd6434a1b + comment: | + chosen from /dev/random + +# #### + +- typedef: + name: AppParametersPtr + type: ROMlib_AppParameters_t* + +# #### + +- struct: + name: LaunchParamBlockRec + members: + - name: reserved1 + type: LONGINT + - name: reserved2 + type: INTEGER + - name: launchBlockID + type: INTEGER + - name: launchEPBLength + type: LONGINT + - name: launchFileFlags + type: INTEGER + - name: launchControlFlags + type: LaunchFlags + - name: launchAppSpec + type: FSSpecPtr + - name: launchProcessSN + type: ProcessSerialNumber + - name: launchPreferredSize + type: LONGINT + - name: launchMinimumSize + type: LONGINT + - name: launchAvailableSize + type: LONGINT + - name: launchAppParameters + type: AppParametersPtr + size: 44 + +# #### + +- enum: + values: + - name: extendedBlock + value: 0x4C43 + +# #### + +- enum: + values: + - name: extendedBlockLen + value: sizeof(LaunchParamBlockRec) - 12 + +# #### + +- enum: + values: + - name: launchContinue + value: 0x4000 + +# #### + +- struct: + name: ProcessInfoRec + members: + - name: processInfoLength + type: uint32_t + - name: processName + type: StringPtr + - name: processNumber + type: ProcessSerialNumber + - name: processType + type: uint32_t + - name: processSignature + type: OSType + - name: processMode + type: uint32_t + - name: processLocation + type: Ptr + - name: processSize + type: uint32_t + - name: processFreeMem + type: uint32_t + - name: processLauncher + type: ProcessSerialNumber + - name: processLaunchDate + type: uint32_t + - name: processActiveTime + type: uint32_t + - name: processAppSpec + type: FSSpecPtr + size: 60 + +# #### + +- typedef: + name: ProcessInfoPtr + type: ProcessInfoRec* + +# #### + +- enum: + values: + - name: modeDeskAccessory + value: 0x00020000 + - name: modeMultiLaunch + value: 0x00010000 + - name: modeNeedSuspendResume + value: 0x00004000 + - name: modeCanBackground + value: 0x00001000 + - name: modeDoesActivateOnFGSwitch + value: 0x00000800 + - name: modeOnlyBackground + value: 0x00000400 + - name: modeGetFrontClicks + value: 0x00000200 + - name: modeGetAppDiedMsg + value: 0x00000100 + - name: mode32BitCompatible + value: 0x00000080 + - name: modeHighLevelEventAware + value: 0x00000040 + - name: modeLocalAndRemoteHLEvents + value: 0x00000020 + - name: modeStationeryAware + value: 0x00000010 + - name: modeUseTextEditServices + value: 0x00000008 + comment: | + flags for the `processMode' field of the `ProcessInformationRec' + record + +# #### + +- enum: + values: + - name: kNoProcess + value: 0 + - name: kSystemProcess + value: 1 + - name: kCurrentProcess + value: 2 + +# #### + +- enum: + values: + - name: procNotFound + value: -600 + +# #### + +- executor_only: + code: | + extern void process_create(bool desk_accessory_p, + uint32_t type, uint32_t signature); + +# #### + +- function: + name: GetCurrentProcess + return: OSErr + args: + - name: serial_number + type: ProcessSerialNumber* + dispatcher: OSDispatch + selector: 0x0037 + executor: C_ + +# #### + +- function: + name: GetNextProcess + return: OSErr + args: + - name: serial_number + type: ProcessSerialNumber* + dispatcher: OSDispatch + selector: 0x0038 + executor: C_ + +# #### + +- function: + name: GetProcessInformation + return: OSErr + args: + - name: serial_number + type: ProcessSerialNumber* + - name: info + type: ProcessInfoPtr + dispatcher: OSDispatch + selector: 0x003A + executor: C_ + +# #### + +- function: + name: SameProcess + return: OSErr + args: + - name: serial_number0 + type: ProcessSerialNumber* + - name: serial_number1 + type: ProcessSerialNumber* + - name: same_out + type: Boolean* + dispatcher: OSDispatch + selector: 0x003D + executor: C_ + +# #### + +- executor_only: + code: | + extern OSErr C_GetFrontProcess(ProcessSerialNumber *serial_number, int32_t dummy = -1); + PASCAL_SUBTRAP(GetFrontProcess, 0xA88F, 0x0039, OSDispatch); + +# #### + +- function: + name: SetFrontProcess + return: OSErr + args: + - name: serial_number + type: ProcessSerialNumber* + dispatcher: OSDispatch + selector: 0x003B + executor: C_ + +# #### + +- function: + name: WakeUpProcess + return: OSErr + args: + - name: serial_number + type: ProcessSerialNumber* + dispatcher: OSDispatch + selector: 0x003C + executor: C_ + +# #### + +- function: + name: GetProcessSerialNumberFromPortName + return: OSErr + args: + - name: port_name + type: PPCPortPtr + - name: serial_number + type: ProcessSerialNumber* + dispatcher: OSDispatch + selector: 0x0035 + executor: C_ + +# #### + +- function: + name: GetPortNameFromProcessSerialNumber + return: OSErr + args: + - name: port_name + type: PPCPortPtr + - name: serial_number + type: ProcessSerialNumber* + dispatcher: OSDispatch + selector: 0x0046 + executor: C_ + +# #### + +- function: + name: LaunchApplication + return: OSErr + args: + - name: params + type: LaunchParamBlockRec* + register: A0 + executor: true + trap: 0xA9F2 + returnreg: D0 + +# #### + +- executor_only: + code: | + extern OSErr NewLaunch(ConstStringPtr appl, INTEGER vrefnum, + LaunchParamBlockRec *lpbp); diff --git a/defs/QuickDraw.yaml b/defs/QuickDraw.yaml new file mode 100644 index 0000000..9e0a3d9 --- /dev/null +++ b/defs/QuickDraw.yaml @@ -0,0 +1,3183 @@ +- enum: + values: + - name: grafSize + value: 206 + comment: | + number of bytes InitGraf needs + +# #### + +- enum: + values: + - name: srcCopy + value: 0 + - name: srcOr + value: 1 + - name: srcXor + value: 2 + - name: srcBic + value: 3 + - name: notSrcCopy + value: 4 + - name: notSrcOr + value: 5 + - name: notSrcXor + value: 6 + - name: notSrcBic + value: 7 + +# #### + +- enum: + values: + - name: patCopy + value: 8 + - name: patOr + value: 9 + - name: patXor + value: 10 + - name: patBic + value: 11 + - name: notPatCopy + value: 12 + - name: notPatOr + value: 13 + - name: notPatXor + value: 14 + - name: notPatBic + value: 15 + +# #### + +- enum: + values: + - name: grayishTextOr + value: 49 + +# #### + +- enum: + values: + - name: hilite + value: 50 + +# #### + +- enum: + values: + - name: blackColor + value: 33 + - name: whiteColor + value: 30 + - name: redColor + value: 205 + - name: greenColor + value: 341 + - name: blueColor + value: 409 + - name: cyanColor + value: 273 + - name: magentaColor + value: 137 + - name: yellowColor + value: 69 + +# #### + +- enum: + values: + - name: picLParen + value: 0 + - name: picRParen + value: 1 + +# #### + +- enum: + values: + - name: normal + value: 0 + - name: bold + value: 1 + - name: italic + value: 2 + - name: underline + value: 4 + - name: outline + value: 8 + - name: shadow + value: 16 + - name: condense + value: 32 + - name: extend + value: 64 + name: StyleItem + +# #### + +- typedef: + name: Style + type: SignedByte + +# #### + +- struct: + name: Region + members: + - name: rgnSize + type: INTEGER + - name: rgnBBox + type: Rect + size: 10 + +# #### + +- typedef: + name: RgnPtr + type: Region* + +# #### + +- typedef: + name: RgnHandle + type: RgnPtr* + +# #### + +- struct: + name: BitMap + members: + - name: baseAddr + type: Ptr + - name: rowBytes + type: INTEGER + - name: bounds + type: Rect + size: 14 + +# #### + +- struct: + name: Pattern + members: + - name: pat + type: Byte[8] + +# #### + +- typedef: + name: Bits16 + type: INTEGER[16] + +# #### + +- struct: + name: Cursor + members: + - name: data + type: Bits16 + - name: mask + type: Bits16 + - name: hotSpot + type: Point + size: 68 + +# #### + +- typedef: + name: CursPtr + type: Cursor* + +# #### + +- typedef: + name: CursHandle + type: CursPtr* + +# #### + +- typedef: + name: GrafVerb + type: SignedByte + +# #### + +- enum: + values: + - name: frame + value: 0 + - name: paint + value: 1 + - name: erase + value: 2 + - name: invert + value: 3 + - name: fill + value: 4 + +# #### + +- struct: + name: Polygon + members: + - name: polySize + type: INTEGER + - name: polyBBox + type: Rect + - name: polyPoints + type: Point[1] + size: 14 + +# #### + +- typedef: + name: PolyPtr + type: Polygon* + +# #### + +- typedef: + name: PolyHandle + type: PolyPtr* + +# #### + +- struct: + name: FontInfo + members: + - name: ascent + type: INTEGER + - name: descent + type: INTEGER + - name: widMax + type: INTEGER + - name: leading + type: INTEGER + size: 8 + +# #### + +- funptr: + args: + - name: bc + type: INTEGER + - name: textb + type: Ptr + - name: num + type: Point + - name: den + type: Point + name: QDTextUPP + +# #### + +- funptr: + args: + - name: drawto + type: Point + name: QDLineUPP + +# #### + +- funptr: + args: + - name: verb + type: GrafVerb + - name: rp + type: const Rect* + name: QDRectUPP + +# #### + +- funptr: + args: + - name: verb + type: GrafVerb + - name: rp + type: const Rect* + - name: ow + type: INTEGER + - name: oh + type: INTEGER + name: QDRRectUPP + +# #### + +- funptr: + args: + - name: verb + type: GrafVerb + - name: rp + type: const Rect* + name: QDOvalUPP + +# #### + +- funptr: + args: + - name: verb + type: GrafVerb + - name: rp + type: const Rect* + - name: ang + type: INTEGER + - name: arc + type: INTEGER + name: QDArcUPP + +# #### + +- funptr: + args: + - name: verb + type: GrafVerb + - name: poly + type: PolyHandle + name: QDPolyUPP + +# #### + +- funptr: + args: + - name: verb + type: GrafVerb + - name: rgn + type: RgnHandle + name: QDRgnUPP + +# #### + +- funptr: + args: + - name: srcb + type: const BitMap* + - name: srcr + type: const Rect* + - name: dstr + type: const Rect* + - name: mod + type: INTEGER + - name: mask + type: RgnHandle + name: QDBitsUPP + +# #### + +- funptr: + args: + - name: kind + type: INTEGER + - name: size + type: INTEGER + - name: data + type: Handle + name: QDCommentUPP + +# #### + +- funptr: + return: INTEGER + args: + - name: bc + type: INTEGER + - name: texta + type: Ptr + - name: numer + type: Point* + - name: denom + type: Point* + - name: info + type: FontInfo* + name: QDTexMeasUPP + +# #### + +- funptr: + args: + - name: data + type: void* + - name: bc + type: INTEGER + name: QDGetPicUPP + +# #### + +- funptr: + args: + - name: data + type: const void* + - name: bc + type: INTEGER + name: QDPutPicUPP + +# #### + +- struct: + name: QDProcs + members: + - name: textProc + type: QDTextUPP + - name: lineProc + type: QDLineUPP + - name: rectProc + type: QDRectUPP + - name: rRectProc + type: QDRRectUPP + - name: ovalProc + type: QDOvalUPP + - name: arcProc + type: QDArcUPP + - name: polyProc + type: QDPolyUPP + - name: rgnProc + type: QDRgnUPP + - name: bitsProc + type: QDBitsUPP + - name: commentProc + type: QDCommentUPP + - name: txMeasProc + type: QDTexMeasUPP + - name: getPicProc + type: QDGetPicUPP + - name: putPicProc + type: QDPutPicUPP + size: 52 + +# #### + +- typedef: + name: QDProcsPtr + type: QDProcs* + +# #### + +- struct: + name: GrafPort + members: + - name: device + type: INTEGER + - name: portBits + type: BitMap + - name: portRect + type: Rect + - name: visRgn + type: RgnHandle + - name: clipRgn + type: RgnHandle + - name: bkPat + type: Pattern + - name: fillPat + type: Pattern + - name: pnLoc + type: Point + - name: pnSize + type: Point + - name: pnMode + type: INTEGER + - name: pnPat + type: Pattern + - name: pnVis + type: INTEGER + - name: txFont + type: INTEGER + - name: txFace + type: Style + - name: filler + type: Byte + - name: txMode + type: INTEGER + - name: txSize + type: INTEGER + - name: spExtra + type: Fixed + - name: fgColor + type: LONGINT + - name: bkColor + type: LONGINT + - name: colrBit + type: INTEGER + - name: patStretch + type: INTEGER + - name: picSave + type: Handle + - name: rgnSave + type: Handle + - name: polySave + type: Handle + - name: grafProcs + type: QDProcsPtr + size: 108 + +# #### + +- typedef: + name: GrafPtr + type: GrafPort* + +# #### + +- struct: + name: Picture + members: + - name: picSize + type: INTEGER + - name: picFrame + type: Rect + size: 10 + +# #### + +- typedef: + name: PicPtr + type: Picture* + +# #### + +- typedef: + name: PicHandle + type: PicPtr* + +# #### + +- struct: + name: PenState + members: + - name: pnLoc + type: Point + - name: pnSize + type: Point + - name: pnMode + type: INTEGER + - name: pnPat + type: Pattern + size: 18 + +# #### + +- enum: + values: + - name: blend + value: 32 + - name: addPin + - name: addOver + - name: subPin + - name: transparent + - name: adMax + - name: subOver + - name: adMin + - name: mask + value: 64 + comment: | + IMV stuff is used when we parse Version 2 pictures, but the IMV calls + are not supported in V1.0 + +# #### + +- enum: + values: + - name: pHiliteBit + value: 0 + - name: hiliteBit + value: 7 + +# #### + +- enum: + values: + - name: defQDColors + value: 127 + +# #### + +- struct: + name: RGBColor + members: + - name: red + type: uint16_t + - name: green + type: uint16_t + - name: blue + type: uint16_t + size: 6 + +# #### + +- struct: + name: HSVColor + members: + - name: hue + type: SmallFract + - name: saturation + type: SmallFract + - name: value + type: SmallFract + size: 6 + +# #### + +- struct: + name: HSLColor + members: + - name: hue + type: SmallFract + - name: saturation + type: SmallFract + - name: lightness + type: SmallFract + size: 6 + +# #### + +- struct: + name: CMYColor + members: + - name: cyan + type: SmallFract + - name: magenta + type: SmallFract + - name: yellow + type: SmallFract + size: 6 + +# #### + +- struct: + name: ColorSpec + members: + - name: value + type: INTEGER + - name: rgb + type: RGBColor + size: 8 + +# #### + +- typedef: + name: cSpecArray + type: ColorSpec[1] + comment: | + can't use 0 + +# #### + +- struct: + name: ColorTable + members: + - name: ctSeed + type: LONGINT + - name: ctFlags + type: uint16_t + - name: ctSize + type: INTEGER + - name: ctTable + type: cSpecArray + size: 16 + +# #### + +- typedef: + name: CTabPtr + type: ColorTable* + +# #### + +- typedef: + name: CTabHandle + type: CTabPtr* + +# #### + +- struct: + name: CQDProcs + members: + - name: textProc + type: QDTextUPP + - name: lineProc + type: QDLineUPP + - name: rectProc + type: QDRectUPP + - name: rRectProc + type: QDRRectUPP + - name: ovalProc + type: QDOvalUPP + - name: arcProc + type: QDArcUPP + - name: polyProc + type: QDPolyUPP + - name: rgnProc + type: QDRgnUPP + - name: bitsProc + type: QDBitsUPP + - name: commentProc + type: QDCommentUPP + - name: txMeasProc + type: QDTexMeasUPP + - name: getPicProc + type: QDGetPicUPP + - name: putPicProc + type: QDPutPicUPP + - name: opcodeProc + type: Ptr + - name: newProc1Proc + type: Ptr + - name: newProc2Proc + type: Ptr + - name: newProc3Proc + type: Ptr + - name: newProc4Proc + type: Ptr + - name: newProc5Proc + type: Ptr + - name: newProc6Proc + type: Ptr + size: 80 + +# #### + +- typedef: + name: CQDProcsPtr + type: CQDProcs* + +# #### + +- struct: + name: PixMap + members: + - name: baseAddr + type: Ptr + - name: rowBytes + type: INTEGER + - name: bounds + type: Rect + - name: pmVersion + type: INTEGER + - name: packType + type: INTEGER + - name: packSize + type: LONGINT + - name: hRes + type: Fixed + - name: vRes + type: Fixed + - name: pixelType + type: INTEGER + - name: pixelSize + type: INTEGER + - name: cmpCount + type: INTEGER + - name: cmpSize + type: INTEGER + - name: planeBytes + type: LONGINT + - name: pmTable + type: CTabHandle + - name: pmReserved + type: LONGINT + size: 50 + +# #### + +- typedef: + name: PixMapPtr + type: PixMap* + +# #### + +- typedef: + name: PixMapHandle + type: PixMapPtr* + +# #### + +- enum: + values: + - name: ROWMASK + value: 0x1FFF + +# #### + +- struct: + name: PixPat + members: + - name: patType + type: INTEGER + - name: patMap + type: PixMapHandle + - name: patData + type: Handle + - name: patXData + type: Handle + - name: patXValid + type: INTEGER + - name: patXMap + type: Handle + - name: pat1Data + type: Pattern + size: 28 + +# #### + +- typedef: + name: PixPatPtr + type: PixPat* + +# #### + +- typedef: + name: PixPatHandle + type: PixPatPtr* + +# #### + +- struct: + name: CGrafPort + members: + - name: device + type: INTEGER + - name: portPixMap + type: PixMapHandle + - name: portVersion + type: INTEGER + - name: grafVars + type: Handle + - name: chExtra + type: INTEGER + - name: pnLocHFrac + type: INTEGER + - name: portRect + type: Rect + - name: visRgn + type: RgnHandle + - name: clipRgn + type: RgnHandle + - name: bkPixPat + type: PixPatHandle + - name: rgbFgColor + type: RGBColor + - name: rgbBkColor + type: RGBColor + - name: pnLoc + type: Point + - name: pnSize + type: Point + - name: pnMode + type: INTEGER + - name: pnPixPat + type: PixPatHandle + - name: fillPixPat + type: PixPatHandle + - name: pnVis + type: INTEGER + - name: txFont + type: INTEGER + - name: txFace + type: Style + - name: filler + type: Byte + - name: txMode + type: INTEGER + - name: txSize + type: INTEGER + - name: spExtra + type: Fixed + - name: fgColor + type: LONGINT + - name: bkColor + type: LONGINT + - name: colrBit + type: INTEGER + - name: patStretch + type: INTEGER + - name: picSave + type: Handle + - name: rgnSave + type: Handle + - name: polySave + type: Handle + - name: grafProcs + type: CQDProcsPtr + size: 108 + +# #### + +- typedef: + name: CGrafPtr + type: CGrafPort* + +# #### + +- struct: + name: CCrsr + members: + - name: crsrType + type: INTEGER + - name: crsrMap + type: PixMapHandle + - name: crsrData + type: Handle + - name: crsrXData + type: Handle + - name: crsrXValid + type: INTEGER + - name: crsrXHandle + type: Handle + - name: crsr1Data + type: Bits16 + - name: crsrMask + type: Bits16 + - name: crsrHotSpot + type: Point + - name: crsrXTable + type: LONGINT + - name: crsrID + type: LONGINT + size: 96 + +# #### + +- typedef: + name: CCrsrPtr + type: CCrsr* + +# #### + +- typedef: + name: CCrsrHandle + type: CCrsrPtr* + +# #### + +- struct: + name: MatchRec + members: + - name: red + type: uint16_t + - name: green + type: uint16_t + - name: blue + type: uint16_t + - name: matchData + type: int32_t + size: 10 + +# #### + +- typedef: + name: BytePtr + type: Byte* + +# #### + +- struct: + name: QDGlobals + members: + - name: privates + type: char[76] + - name: randSeed + type: int32_t + - name: screenBits + type: BitMap + - name: arrow + type: Cursor + - name: dkGray + type: Pattern + - name: ltGray + type: Pattern + - name: gray + type: Pattern + - name: black + type: Pattern + - name: white + type: Pattern + - name: thePort + type: GrafPtr + +# #### + +- typedef: + name: QDGlobalsPtr + type: QDGlobals* + +# #### + +- lowmem: + name: ScrVRes + type: INTEGER + address: 0x102 + comment: | + QuickDraw IMI-473 (true); + +# #### + +- lowmem: + name: ScrHRes + type: INTEGER + address: 0x104 + comment: | + QuickDraw IMI-473 (true); + +# #### + +- lowmem: + name: ScreenRow + type: INTEGER + address: 0x106 + comment: | + QuickDraw ThinkC (true); + +# #### + +- lowmem: + name: RndSeed + type: LONGINT + address: 0x156 + comment: | + QuickDraw IMI-195 (true); + +# #### + +- lowmem: + name: ScreenVars + type: Byte[8] + address: 0x292 + comment: | + QuickDraw MPW (false); + +# #### + +- lowmem: + name: Key1Trans + type: Ptr + address: 0x29E + comment: | + * NOTE: Key1Trans in the keyboard translator procedure, and Key2Trans in the + * numeric keypad translator procedure (MPW). + QuickDraw MPW (false); + +# #### + +- lowmem: + name: Key2Trans + type: Ptr + address: 0x2A2 + comment: | + QuickDraw MPW (false); + +# #### + +- lowmem: + name: JUnknown574 + type: ProcPtr + address: 0x574 + comment: | + QuickDraw IMV (true-b); + +# #### + +- lowmem: + name: JADBProc + type: ProcPtr + address: 0x6B8 + comment: | + QuickDraw IMV (false); + +# #### + +- lowmem: + name: JHideCursor + type: ProcPtr + address: 0x800 + comment: | + QuickDraw Private.a (true-b); + +# #### + +- lowmem: + name: JShowCursor + type: ProcPtr + address: 0x804 + comment: | + QuickDraw Private.a (true-b); + +# #### + +- lowmem: + name: JShieldCursor + type: ProcPtr + address: 0x808 + comment: | + QuickDraw Private.a (true-b); + +# #### + +- lowmem: + name: JScrnAddr + type: ProcPtr + address: 0x80C + comment: | + QuickDraw Private.a (false); + +# #### + +- lowmem: + name: JScrnSize + type: ProcPtr + address: 0x810 + comment: | + QuickDraw Private.a (false); + +# #### + +- lowmem: + name: JInitCrsr + type: ProcPtr + address: 0x814 + comment: | + QuickDraw Private.a (true-b); + +# #### + +- lowmem: + name: JSetCrsr + type: ProcPtr + address: 0x818 + comment: | + QuickDraw Private.a (true-b); + +# #### + +- lowmem: + name: JCrsrObscure + type: ProcPtr + address: 0x81C + comment: | + QuickDraw Private.a (true-b); + +# #### + +- lowmem: + name: JUpdateProc + type: ProcPtr + address: 0x820 + comment: | + QuickDraw Private.a (false); + +# #### + +- lowmem: + name: ScrnBase + type: Ptr + address: 0x824 + comment: | + QuickDraw IMII-19 (true); + +# #### + +- lowmem: + name: CrsrPin + type: Rect + address: 0x834 + comment: | + * MouseLocation used to be 0x830, but that doesn't jibe with what I've + * seen of Crystal Quest --ctm + QuickDraw ThinkC (false); + +# #### + +- lowmem: + name: QDColors + type: Byte + address: 0x8B0 + comment: | + QuickDraw IMV (false); + +# #### + +- lowmem: + name: CrsrVis + type: Boolean + address: 0x8CC + comment: | + QuickDraw SysEqu.a (true); + +# #### + +- lowmem: + name: CrsrBusy + type: Byte + address: 0x8CD + comment: | + QuickDraw SysEqu.a (true); + +# #### + +- lowmem: + name: CrsrState + type: INTEGER + address: 0x8D0 + comment: | + QuickDraw SysEqu.a (true); + +# #### + +- lowmem: + name: mousemask + type: LONGINT + address: 0x8D6 + comment: | + QuickDraw .a (true-b); + +# #### + +- lowmem: + name: mouseoffset + type: LONGINT + address: 0x8DA + comment: | + QuickDraw SysEqu.a (true-b); + +# #### + +- lowmem: + name: JCrsrTask + type: ProcPtr + address: 0x8EE + comment: | + (true); + +# #### + +- lowmem: + name: HiliteMode + type: Byte + address: 0x938 + comment: | + QuickDraw IMV (true-b); + +# #### + +- executor_only: + code: | + extern void C_unknown574(); + PASCAL_FUNCTION(unknown574); + +# #### + +- function: + name: CopyBits + args: + - name: src_bitmap + type: BitMap* + - name: dst_bitmap + type: BitMap* + - name: src_rect + type: const Rect* + - name: dst_rect + type: const Rect* + - name: mode + type: INTEGER + - name: mask + type: RgnHandle + trap: 0xA8EC + executor: C_ + +# #### + +- function: + name: ScrollRect + args: + - name: rp + type: Rect* + - name: dh + type: INTEGER + - name: dv + type: INTEGER + - name: updatergn + type: RgnHandle + trap: 0xA8EF + executor: C_ + +# #### + +- function: + name: ForeColor + args: + - name: c + type: LONGINT + trap: 0xA862 + executor: C_ + +# #### + +- function: + name: BackColor + args: + - name: c + type: LONGINT + trap: 0xA863 + executor: C_ + +# #### + +- function: + name: ColorBit + args: + - name: b + type: INTEGER + trap: 0xA864 + executor: C_ + +# #### + +- function: + name: SetCursor + args: + - name: cp + type: Cursor* + trap: 0xA851 + executor: C_ + +# #### + +- function: + name: InitCursor + trap: 0xA850 + executor: C_ + +# #### + +- function: + name: HideCursor + trap: 0xA852 + executor: C_ + +# #### + +- function: + name: ShowCursor + trap: 0xA853 + executor: C_ + +# #### + +- function: + name: ObscureCursor + trap: 0xA856 + executor: C_ + +# #### + +- function: + name: ShieldCursor + args: + - name: rp + type: Rect* + - name: p + type: Point + trap: 0xA855 + executor: C_ + +# #### + +- function: + name: InitGraf + args: + - name: gp + type: GrafPtr* + trap: 0xA86E + executor: C_ + +# #### + +- function: + name: SetPort + args: + - name: p + type: GrafPtr + trap: 0xA873 + executor: C_ + +# #### + +- function: + name: InitPort + args: + - name: p + type: GrafPtr + trap: 0xA86D + executor: C_ + +# #### + +- function: + name: OpenPort + args: + - name: p + type: GrafPtr + trap: 0xA86F + executor: C_ + +# #### + +- function: + name: ClosePort + args: + - name: p + type: GrafPtr + trap: 0xA87D + executor: C_ + +# #### + +- function: + name: GetPort + args: + - name: pp + type: GrafPtr* + trap: 0xA874 + executor: C_ + +# #### + +- function: + name: GrafDevice + args: + - name: d + type: INTEGER + trap: 0xA872 + executor: C_ + +# #### + +- function: + name: SetPortBits + args: + - name: bm + type: BitMap* + trap: 0xA875 + executor: C_ + +# #### + +- function: + name: PortSize + args: + - name: w + type: INTEGER + - name: h + type: INTEGER + trap: 0xA876 + executor: C_ + +# #### + +- function: + name: MovePortTo + args: + - name: lg + type: INTEGER + - name: tg + type: INTEGER + trap: 0xA877 + executor: C_ + +# #### + +- function: + name: SetOrigin + args: + - name: h + type: INTEGER + - name: v + type: INTEGER + trap: 0xA878 + executor: C_ + +# #### + +- function: + name: SetClip + args: + - name: r + type: RgnHandle + trap: 0xA879 + executor: C_ + +# #### + +- function: + name: GetClip + args: + - name: r + type: RgnHandle + trap: 0xA87A + executor: C_ + +# #### + +- function: + name: ClipRect + args: + - name: r + type: Rect* + trap: 0xA87B + executor: C_ + +# #### + +- function: + name: BackPat + args: + - name: pp + type: const Pattern* + trap: 0xA87C + executor: C_ + +# #### + +- function: + name: SeedFill + args: + - name: srcp + type: Ptr + - name: dstp + type: Ptr + - name: srcr + type: INTEGER + - name: dstr + type: INTEGER + - name: height + type: INTEGER + - name: width + type: INTEGER + - name: seedh + type: INTEGER + - name: seedv + type: INTEGER + trap: 0xA839 + executor: C_ + +# #### + +- function: + name: CalcMask + args: + - name: srcp + type: Ptr + - name: dstp + type: Ptr + - name: srcr + type: INTEGER + - name: dstr + type: INTEGER + - name: height + type: INTEGER + - name: width + type: INTEGER + trap: 0xA838 + executor: C_ + +# #### + +- function: + name: CopyMask + args: + - name: srcbp + type: BitMap* + - name: mskbp + type: BitMap* + - name: dstbp + type: BitMap* + - name: srcrp + type: const Rect* + - name: mskrp + type: const Rect* + - name: dstrp + type: const Rect* + trap: 0xA817 + executor: C_ + +# #### + +- function: + name: GetMaskTable + return: INTEGER* + trap: 0xA836 + executor: C_ + +# #### + +- function: + name: CharExtra + args: + - name: Extra + type: Fixed + trap: 0xAA23 + executor: C_ + +# #### + +- function: + name: MakeRGBPat + args: + - name: ph + type: PixPatHandle + - name: colorp + type: RGBColor* + trap: 0xAA0D + executor: C_ + +# #### + +- function: + name: Random + return: INTEGER + trap: 0xA861 + executor: C_ + +# #### + +- function: + name: GetPixel + return: Boolean + args: + - name: h + type: INTEGER + - name: v + type: INTEGER + trap: 0xA865 + executor: C_ + +# #### + +- function: + name: StuffHex + args: + - name: p + type: Ptr + - name: s + type: ConstStringPtr + trap: 0xA866 + executor: C_ + +# #### + +- function: + name: ScalePt + args: + - name: pt + type: Point* + - name: srcr + type: const Rect* + - name: dstr + type: const Rect* + trap: 0xA8F8 + executor: C_ + +# #### + +- function: + name: MapPt + args: + - name: pt + type: Point* + - name: srcr + type: const Rect* + - name: dstr + type: const Rect* + trap: 0xA8F9 + executor: C_ + +# #### + +- function: + name: MapRect + args: + - name: r + type: Rect* + - name: srcr + type: const Rect* + - name: dstr + type: const Rect* + trap: 0xA8FA + executor: C_ + +# #### + +- function: + name: MapRgn + args: + - name: rh + type: RgnHandle + - name: srcr + type: const Rect* + - name: dstr + type: const Rect* + trap: 0xA8FB + executor: C_ + +# #### + +- function: + name: MapPoly + args: + - name: poly + type: PolyHandle + - name: srcr + type: const Rect* + - name: dstr + type: const Rect* + trap: 0xA8FC + executor: C_ + +# #### + +- function: + name: HidePen + trap: 0xA896 + executor: C_ + +# #### + +- function: + name: ShowPen + trap: 0xA897 + executor: C_ + +# #### + +- function: + name: GetPen + args: + - name: ptp + type: Point* + trap: 0xA89A + executor: C_ + +# #### + +- function: + name: GetPenState + args: + - name: ps + type: PenState* + trap: 0xA898 + executor: C_ + +# #### + +- function: + name: SetPenState + args: + - name: ps + type: PenState* + trap: 0xA899 + executor: C_ + +# #### + +- function: + name: PenSize + args: + - name: w + type: INTEGER + - name: h + type: INTEGER + trap: 0xA89B + executor: C_ + +# #### + +- function: + name: PenMode + args: + - name: m + type: INTEGER + trap: 0xA89C + executor: C_ + +# #### + +- function: + name: PenPat + args: + - name: pp + type: const Pattern* + trap: 0xA89D + executor: C_ + +# #### + +- function: + name: PenNormal + trap: 0xA89E + executor: C_ + +# #### + +- function: + name: MoveTo + args: + - name: h + type: INTEGER + - name: v + type: INTEGER + trap: 0xA893 + executor: C_ + +# #### + +- function: + name: Move + args: + - name: dh + type: INTEGER + - name: dv + type: INTEGER + trap: 0xA894 + executor: C_ + +# #### + +- function: + name: LineTo + args: + - name: h + type: INTEGER + - name: v + type: INTEGER + trap: 0xA891 + executor: C_ + +# #### + +- function: + name: Line + args: + - name: dh + type: INTEGER + - name: dv + type: INTEGER + trap: 0xA892 + executor: C_ + +# #### + +- function: + name: DrawPicture + args: + - name: pic + type: PicHandle + - name: destrp + type: const Rect* + trap: 0xA8F6 + executor: C_ + +# #### + +- function: + name: OpenPicture + return: PicHandle + args: + - name: pf + type: const Rect* + trap: 0xA8F3 + executor: C_ + +# #### + +- function: + name: ClosePicture + trap: 0xA8F4 + executor: C_ + +# #### + +- function: + name: PicComment + args: + - name: kind + type: INTEGER + - name: size + type: INTEGER + - name: hand + type: Handle + trap: 0xA8F2 + executor: C_ + +# #### + +- function: + name: KillPicture + args: + - name: pic + type: PicHandle + trap: 0xA8F5 + executor: C_ + +# #### + +- function: + name: AddPt + args: + - name: src + type: Point + - name: dst + type: Point* + trap: 0xA87E + executor: C_ + +# #### + +- function: + name: SubPt + args: + - name: src + type: Point + - name: dst + type: Point* + trap: 0xA87F + executor: C_ + +# #### + +- function: + name: SetPt + args: + - name: pt + type: Point* + - name: h + type: INTEGER + - name: v + type: INTEGER + trap: 0xA880 + executor: C_ + +# #### + +- function: + name: EqualPt + return: Boolean + args: + - name: p1 + type: Point + - name: p2 + type: Point + trap: 0xA881 + executor: C_ + +# #### + +- function: + name: LocalToGlobal + args: + - name: pt + type: Point* + trap: 0xA870 + executor: C_ + +# #### + +- function: + name: GlobalToLocal + args: + - name: pt + type: Point* + trap: 0xA871 + executor: C_ + +# #### + +- function: + name: OpenPoly + return: PolyHandle + trap: 0xA8CB + executor: C_ + +# #### + +- function: + name: ClosePoly + trap: 0xA8CC + executor: C_ + +# #### + +- function: + name: KillPoly + args: + - name: poly + type: PolyHandle + trap: 0xA8CD + executor: C_ + +# #### + +- function: + name: OffsetPoly + args: + - name: poly + type: PolyHandle + - name: dh + type: INTEGER + - name: dv + type: INTEGER + trap: 0xA8CE + executor: C_ + +# #### + +- function: + name: SetRect + args: + - name: r + type: Rect* + - name: left + type: INTEGER + - name: top + type: INTEGER + - name: right + type: INTEGER + - name: bottom + type: INTEGER + trap: 0xA8A7 + executor: C_ + +# #### + +- function: + name: OffsetRect + args: + - name: r + type: Rect* + - name: dh + type: INTEGER + - name: dv + type: INTEGER + trap: 0xA8A8 + executor: C_ + +# #### + +- function: + name: InsetRect + args: + - name: r + type: Rect* + - name: dh + type: INTEGER + - name: dv + type: INTEGER + trap: 0xA8A9 + executor: C_ + +# #### + +- function: + name: EmptyRect + return: Boolean + args: + - name: r + type: const Rect* + trap: 0xA8AE + executor: C_ + +# #### + +- function: + name: SectRect + return: Boolean + args: + - name: s1 + type: const Rect* + - name: s2 + type: const Rect* + - name: dest + type: Rect* + trap: 0xA8AA + executor: C_ + +# #### + +- function: + name: UnionRect + args: + - name: s1 + type: const Rect* + - name: s2 + type: const Rect* + - name: dest + type: Rect* + trap: 0xA8AB + executor: C_ + +# #### + +- function: + name: PtInRect + return: Boolean + args: + - name: p + type: Point + - name: r + type: const Rect* + trap: 0xA8AD + executor: C_ + +# #### + +- function: + name: Pt2Rect + args: + - name: p1 + type: Point + - name: p2 + type: Point + - name: dest + type: Rect* + trap: 0xA8AC + executor: C_ + +# #### + +- function: + name: PtToAngle + args: + - name: rp + type: const Rect* + - name: p + type: Point + - name: angle + type: INTEGER* + trap: 0xA8C3 + executor: C_ + +# #### + +- function: + name: EqualRect + return: Boolean + args: + - name: r1 + type: const Rect* + - name: r2 + type: const Rect* + trap: 0xA8A6 + executor: C_ + +# #### + +- function: + name: NewRgn + return: RgnHandle + trap: 0xA8D8 + executor: C_ + +# #### + +- function: + name: OpenRgn + trap: 0xA8DA + executor: C_ + +# #### + +- function: + name: CopyRgn + args: + - name: s + type: RgnHandle + - name: d + type: RgnHandle + trap: 0xA8DC + executor: C_ + +# #### + +- function: + name: CloseRgn + args: + - name: rh + type: RgnHandle + trap: 0xA8DB + executor: C_ + +# #### + +- function: + name: DisposeRgn + args: + - name: rh + type: RgnHandle + trap: 0xA8D9 + executor: C_ + +# #### + +- function: + name: SetEmptyRgn + args: + - name: rh + type: RgnHandle + trap: 0xA8DD + executor: C_ + +# #### + +- function: + name: SetRectRgn + args: + - name: rh + type: RgnHandle + - name: left + type: INTEGER + - name: top + type: INTEGER + - name: right + type: INTEGER + - name: bottom + type: INTEGER + trap: 0xA8DE + executor: C_ + +# #### + +- function: + name: RectRgn + args: + - name: rh + type: RgnHandle + - name: rect + type: const Rect* + trap: 0xA8DF + executor: C_ + +# #### + +- function: + name: OffsetRgn + args: + - name: rh + type: RgnHandle + - name: dh + type: INTEGER + - name: dv + type: INTEGER + trap: 0xA8E0 + executor: C_ + +# #### + +- function: + name: PtInRgn + return: Boolean + args: + - name: p + type: Point + - name: rh + type: RgnHandle + trap: 0xA8E8 + executor: C_ + +# #### + +- function: + name: InsetRgn + args: + - name: rh + type: RgnHandle + - name: dh + type: INTEGER + - name: dv + type: INTEGER + trap: 0xA8E1 + executor: C_ + +# #### + +- function: + name: SectRgn + args: + - name: s1 + type: RgnHandle + - name: s2 + type: RgnHandle + - name: dest + type: RgnHandle + trap: 0xA8E4 + executor: C_ + +# #### + +- function: + name: UnionRgn + args: + - name: s1 + type: RgnHandle + - name: s2 + type: RgnHandle + - name: dest + type: RgnHandle + trap: 0xA8E5 + executor: C_ + +# #### + +- function: + name: DiffRgn + args: + - name: s1 + type: RgnHandle + - name: s2 + type: RgnHandle + - name: dest + type: RgnHandle + trap: 0xA8E6 + executor: C_ + +# #### + +- function: + name: XorRgn + args: + - name: s1 + type: RgnHandle + - name: s2 + type: RgnHandle + - name: dest + type: RgnHandle + trap: 0xA8E7 + executor: C_ + +# #### + +- function: + name: RectInRgn + return: Boolean + args: + - name: rp + type: const Rect* + - name: rh + type: RgnHandle + trap: 0xA8E9 + executor: C_ + +# #### + +- function: + name: EqualRgn + return: Boolean + args: + - name: r1 + type: RgnHandle + - name: r2 + type: RgnHandle + trap: 0xA8E3 + executor: C_ + +# #### + +- function: + name: EmptyRgn + return: Boolean + args: + - name: rh + type: RgnHandle + trap: 0xA8E2 + executor: C_ + +# #### + +- function: + name: FrameRect + args: + - name: r + type: const Rect* + trap: 0xA8A1 + executor: C_ + +# #### + +- function: + name: PaintRect + args: + - name: r + type: const Rect* + trap: 0xA8A2 + executor: C_ + +# #### + +- function: + name: EraseRect + args: + - name: r + type: const Rect* + trap: 0xA8A3 + executor: C_ + +# #### + +- function: + name: InvertRect + args: + - name: r + type: const Rect* + trap: 0xA8A4 + executor: C_ + +# #### + +- function: + name: FillRect + args: + - name: r + type: const Rect* + - name: pat + type: const Pattern* + trap: 0xA8A5 + executor: C_ + +# #### + +- function: + name: FrameOval + args: + - name: r + type: const Rect* + trap: 0xA8B7 + executor: C_ + +# #### + +- function: + name: PaintOval + args: + - name: r + type: const Rect* + trap: 0xA8B8 + executor: C_ + +# #### + +- function: + name: EraseOval + args: + - name: r + type: const Rect* + trap: 0xA8B9 + executor: C_ + +# #### + +- function: + name: InvertOval + args: + - name: r + type: const Rect* + trap: 0xA8BA + executor: C_ + +# #### + +- function: + name: FillOval + args: + - name: r + type: const Rect* + - name: pat + type: const Pattern* + trap: 0xA8BB + executor: C_ + +# #### + +- function: + name: FrameRoundRect + args: + - name: r + type: const Rect* + - name: ow + type: INTEGER + - name: oh + type: INTEGER + trap: 0xA8B0 + executor: C_ + +# #### + +- function: + name: PaintRoundRect + args: + - name: r + type: const Rect* + - name: ow + type: INTEGER + - name: oh + type: INTEGER + trap: 0xA8B1 + executor: C_ + +# #### + +- function: + name: EraseRoundRect + args: + - name: r + type: const Rect* + - name: ow + type: INTEGER + - name: oh + type: INTEGER + trap: 0xA8B2 + executor: C_ + +# #### + +- function: + name: InvertRoundRect + args: + - name: r + type: const Rect* + - name: ow + type: INTEGER + - name: oh + type: INTEGER + trap: 0xA8B3 + executor: C_ + +# #### + +- function: + name: FillRoundRect + args: + - name: r + type: const Rect* + - name: ow + type: INTEGER + - name: oh + type: INTEGER + - name: pat + type: const Pattern* + trap: 0xA8B4 + executor: C_ + +# #### + +- function: + name: FrameArc + args: + - name: r + type: const Rect* + - name: start + type: INTEGER + - name: angle + type: INTEGER + trap: 0xA8BE + executor: C_ + +# #### + +- function: + name: PaintArc + args: + - name: r + type: const Rect* + - name: start + type: INTEGER + - name: angle + type: INTEGER + trap: 0xA8BF + executor: C_ + +# #### + +- function: + name: EraseArc + args: + - name: r + type: const Rect* + - name: start + type: INTEGER + - name: angle + type: INTEGER + trap: 0xA8C0 + executor: C_ + +# #### + +- function: + name: InvertArc + args: + - name: r + type: const Rect* + - name: start + type: INTEGER + - name: angle + type: INTEGER + trap: 0xA8C1 + executor: C_ + +# #### + +- function: + name: FillArc + args: + - name: r + type: const Rect* + - name: start + type: INTEGER + - name: angle + type: INTEGER + - name: pat + type: const Pattern* + trap: 0xA8C2 + executor: C_ + +# #### + +- function: + name: FrameRgn + args: + - name: rh + type: RgnHandle + trap: 0xA8D2 + executor: C_ + +# #### + +- function: + name: PaintRgn + args: + - name: rh + type: RgnHandle + trap: 0xA8D3 + executor: C_ + +# #### + +- function: + name: EraseRgn + args: + - name: rh + type: RgnHandle + trap: 0xA8D4 + executor: C_ + +# #### + +- function: + name: InvertRgn + args: + - name: rh + type: RgnHandle + trap: 0xA8D5 + executor: C_ + +# #### + +- function: + name: FillRgn + args: + - name: rh + type: RgnHandle + - name: pat + type: const Pattern* + trap: 0xA8D6 + executor: C_ + +# #### + +- function: + name: FramePoly + args: + - name: poly + type: PolyHandle + trap: 0xA8C6 + executor: C_ + +# #### + +- function: + name: PaintPoly + args: + - name: poly + type: PolyHandle + trap: 0xA8C7 + executor: C_ + +# #### + +- function: + name: ErasePoly + args: + - name: poly + type: PolyHandle + trap: 0xA8C8 + executor: C_ + +# #### + +- function: + name: InvertPoly + args: + - name: poly + type: PolyHandle + trap: 0xA8C9 + executor: C_ + +# #### + +- function: + name: FillPoly + args: + - name: poly + type: PolyHandle + - name: pat + type: const Pattern* + trap: 0xA8CA + executor: C_ + +# #### + +- function: + name: SetStdProcs + args: + - name: procs + type: QDProcs* + trap: 0xA8EA + executor: C_ + +# #### + +- function: + name: StdArc + args: + - name: verb + type: GrafVerb + - name: r + type: const Rect* + - name: starta + type: INTEGER + - name: arca + type: INTEGER + trap: 0xA8BD + executor: C_ + +# #### + +- function: + name: StdBits + args: + - name: srcbmp + type: const BitMap* + - name: srcrp + type: const Rect* + - name: dstrp + type: const Rect* + - name: mode + type: INTEGER + - name: mask + type: RgnHandle + trap: 0xA8EB + executor: C_ + +# #### + +- function: + name: StdLine + args: + - name: p + type: Point + trap: 0xA890 + executor: C_ + +# #### + +- function: + name: StdOval + args: + - name: v + type: GrafVerb + - name: rp + type: const Rect* + trap: 0xA8B6 + executor: C_ + +# #### + +- function: + name: StdComment + args: + - name: kind + type: INTEGER + - name: size + type: INTEGER + - name: hand + type: Handle + trap: 0xA8F1 + executor: C_ + +# #### + +- function: + name: StdGetPic + args: + - name: dp + type: void* + - name: bc + type: INTEGER + trap: 0xA8EE + executor: C_ + +# #### + +- function: + name: StdPutPic + args: + - name: sp + type: const void* + - name: bc + type: INTEGER + trap: 0xA8F0 + executor: C_ + +# #### + +- function: + name: StdPoly + args: + - name: verb + type: GrafVerb + - name: ph + type: PolyHandle + trap: 0xA8C5 + executor: C_ + +# #### + +- function: + name: StdRRect + args: + - name: verb + type: GrafVerb + - name: r + type: const Rect* + - name: width + type: INTEGER + - name: height + type: INTEGER + trap: 0xA8AF + executor: C_ + +# #### + +- function: + name: StdRect + args: + - name: v + type: GrafVerb + - name: rp + type: const Rect* + trap: 0xA8A0 + executor: C_ + +# #### + +- function: + name: StdRgn + args: + - name: verb + type: GrafVerb + - name: rgn + type: RgnHandle + trap: 0xA8D1 + executor: C_ + +# #### + +- function: + name: StdText + args: + - name: n + type: INTEGER + - name: textbufp + type: Ptr + - name: num + type: Point + - name: den + type: Point + trap: 0xA882 + executor: C_ + +# #### + +- function: + name: StdTxMeas + return: INTEGER + args: + - name: n + type: INTEGER + - name: p + type: Ptr + - name: nump + type: Point* + - name: denp + type: Point* + - name: finfop + type: FontInfo* + trap: 0xA8ED + executor: C_ + +# #### + +- function: + name: MeasureText + args: + - name: n + type: INTEGER + - name: text + type: Ptr + - name: chars + type: Ptr + trap: 0xA837 + executor: C_ + +# #### + +- function: + name: TextFont + args: + - name: f + type: INTEGER + trap: 0xA887 + executor: C_ + +# #### + +- function: + name: TextFace + args: + - name: thef + type: INTEGER + trap: 0xA888 + executor: C_ + +# #### + +- function: + name: TextMode + args: + - name: m + type: INTEGER + trap: 0xA889 + executor: C_ + +# #### + +- function: + name: TextSize + args: + - name: s + type: INTEGER + trap: 0xA88A + executor: C_ + +# #### + +- function: + name: SpaceExtra + args: + - name: e + type: Fixed + trap: 0xA88E + executor: C_ + +# #### + +- function: + name: DrawChar + args: + - name: thec + type: CharParameter + trap: 0xA883 + executor: C_ + +# #### + +- function: + name: DrawString + args: + - name: s + type: ConstStringPtr + trap: 0xA884 + executor: C_ + +# #### + +- function: + name: DrawText + args: + - name: tb + type: Ptr + - name: fb + type: INTEGER + - name: bc + type: INTEGER + trap: 0xA885 + executor: C_ + +# #### + +- function: + name: CharWidth + return: INTEGER + args: + - name: thec + type: CharParameter + trap: 0xA88D + executor: C_ + +# #### + +- function: + name: StringWidth + return: INTEGER + args: + - name: s + type: ConstStringPtr + trap: 0xA88C + executor: C_ + +# #### + +- function: + name: TextWidth + return: INTEGER + args: + - name: tb + type: Ptr + - name: fb + type: INTEGER + - name: bc + type: INTEGER + trap: 0xA886 + executor: C_ + +# #### + +- function: + name: GetFontInfo + args: + - name: ip + type: FontInfo* + trap: 0xA88B + executor: C_ + +# #### + +- function: + name: GetCPixel + args: + - name: h + type: INTEGER + - name: v + type: INTEGER + - name: colorp + type: RGBColor* + trap: 0xAA17 + executor: C_ + +# #### + +- function: + name: SetCPixel + args: + - name: h + type: INTEGER + - name: v + type: INTEGER + - name: colorp + type: RGBColor* + trap: 0xAA16 + executor: C_ + +# #### + +- function: + name: SeedCFill + args: + - name: srcbp + type: BitMap* + - name: dstbp + type: BitMap* + - name: srcrp + type: const Rect* + - name: dstrp + type: const Rect* + - name: seedh + type: INTEGER + - name: seedv + type: INTEGER + - name: matchprocp + type: ProcPtr + - name: matchdata + type: LONGINT + trap: 0xAA50 + executor: C_ + +# #### + +- function: + name: CalcCMask + args: + - name: srcbp + type: BitMap* + - name: dstbp + type: BitMap* + - name: srcrp + type: const Rect* + - name: dstrp + type: const Rect* + - name: seedrgbp + type: RGBColor* + - name: matchprocp + type: ProcPtr + - name: matchdata + type: LONGINT + trap: 0xAA4F + executor: C_ + +# #### + +- function: + name: CopyDeepMask + args: + - name: srcBits + type: BitMap* + - name: maskBits + type: BitMap* + - name: dstBits + type: BitMap* + - name: srcRect + type: const Rect* + - name: maskRect + type: const Rect* + - name: dstRect + type: const Rect* + - name: mode + type: INTEGER + - name: maskRgn + type: RgnHandle + trap: 0xAA51 + executor: C_ + +# #### + +- executor_only: + code: | + inline QDGlobals& qdGlobals() + { + Ptr thePortPtr = *(GUEST *)SYN68K_TO_US(EM_A5); + return *(QDGlobals*)(thePortPtr - offsetof(QDGlobals, thePort)); + } diff --git a/defs/QuickTime.yaml b/defs/QuickTime.yaml new file mode 100644 index 0000000..6b4aab7 --- /dev/null +++ b/defs/QuickTime.yaml @@ -0,0 +1,294 @@ +- struct: + name: MovieRecord + members: + - name: data + type: LONGINT[1] + size: 4 + +# #### + +- typedef: + name: Movie + type: MovieRecord* + +# #### + +- typedef: + name: TimeValue + type: LONGINT + +# #### + +- dispatcher: + name: QuickTime + trap: 0xAAAA + selector-location: D0W + +# #### + +- function: + name: EnterMovies + return: OSErr + dispatcher: QuickTime + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: ExitMovies + dispatcher: QuickTime + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: MoviesTask + args: + - name: movie + type: Movie + - name: maxmillisecs + type: LONGINT + dispatcher: QuickTime + selector: 0x0005 + executor: C_ + +# #### + +- function: + name: PrerollMovie + return: OSErr + args: + - name: movie + type: Movie + - name: time + type: TimeValue + - name: rate + type: Fixed + dispatcher: QuickTime + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: SetMovieActive + args: + - name: movie + type: Movie + - name: active + type: Boolean + dispatcher: QuickTime + selector: 0x0009 + executor: C_ + +# #### + +- function: + name: StartMovie + args: + - name: movie + type: Movie + dispatcher: QuickTime + selector: 0x000B + executor: C_ + +# #### + +- function: + name: StopMovie + args: + - name: movie + type: Movie + dispatcher: QuickTime + selector: 0x000C + executor: C_ + +# #### + +- function: + name: GoToBeginningOfMovie + args: + - name: movie + type: Movie + dispatcher: QuickTime + selector: 0x000D + executor: C_ + +# #### + +- function: + name: SetMovieGWorld + args: + - name: movie + type: Movie + - name: cgrafp + type: CGrafPtr + - name: gdh + type: GDHandle + dispatcher: QuickTime + selector: 0x0016 + executor: C_ + +# #### + +- function: + name: UpdateMovie + return: OSErr + args: + - name: movie + type: Movie + dispatcher: QuickTime + selector: 0x001F + executor: C_ + +# #### + +- function: + name: DisposeMovie + args: + - name: movie + type: Movie + dispatcher: QuickTime + selector: 0x0023 + executor: C_ + +# #### + +- function: + name: GetMovieVolume + return: INTEGER + args: + - name: movie + type: Movie + dispatcher: QuickTime + selector: 0x002E + executor: C_ + +# #### + +- function: + name: CloseMovieFile + return: OSErr + args: + - name: refnum + type: INTEGER + dispatcher: QuickTime + selector: 0x00D5 + executor: C_ + +# #### + +- function: + name: IsMovieDone + return: Boolean + args: + - name: movie + type: Movie + dispatcher: QuickTime + selector: 0x00DD + executor: C_ + +# #### + +- function: + name: NewMovieFromFile + return: OSErr + args: + - name: moviep + type: Movie* + - name: refnum + type: INTEGER + - name: residp + type: INTEGER* + - name: resnamep + type: StringPtr + - name: flags + type: INTEGER + - name: datarefwaschangedp + type: Boolean* + dispatcher: QuickTime + selector: 0x00F0 + executor: C_ + +# #### + +- function: + name: GetMoviePreferredRate + return: Fixed + args: + - name: movie + type: Movie + dispatcher: QuickTime + selector: 0x00F3 + executor: C_ + +# #### + +- function: + name: GetMovieBox + args: + - name: movie + type: Movie + - name: boxp + type: Rect* + dispatcher: QuickTime + selector: 0x00F9 + executor: C_ + +# #### + +- function: + name: SetMovieBox + args: + - name: movie + type: Movie + - name: boxp + type: const Rect* + dispatcher: QuickTime + selector: 0x00FA + executor: C_ + +# #### + +- function: + name: NewMovieController + return: ComponentInstance + args: + - name: movie + type: Movie + - name: mrectp + type: const Rect* + - name: flags + type: LONGINT + dispatcher: QuickTime + selector: 0x018A + executor: C_ + +# #### + +- function: + name: DisposeMovieController + args: + - name: cntrller + type: ComponentInstance + dispatcher: QuickTime + selector: 0x018B + executor: C_ + +# #### + +- function: + name: OpenMovieFile + return: OSErr + args: + - name: filespecp + type: const FSSpec* + - name: refnump + type: INTEGER* + - name: perm + type: uint8_t + dispatcher: QuickTime + selector: 0x0192 + executor: C_ diff --git a/defs/ResourceMgr.yaml b/defs/ResourceMgr.yaml new file mode 100644 index 0000000..4a6f810 --- /dev/null +++ b/defs/ResourceMgr.yaml @@ -0,0 +1,739 @@ +- enum: + values: + - name: resSysHeap + value: 64 + - name: resPurgeable + value: 32 + - name: resLocked + value: 16 + - name: resProtected + value: 8 + - name: resPreload + value: 4 + - name: resChanged + value: 2 + comment: | + resource attribute masks + +# #### + +- enum: + values: + - name: resCompressed + value: 1 + +# #### + +- enum: + values: + - name: CantDecompress + value: -186 + comment: | + resource manager return codes + +# #### + +- enum: + values: + - name: resNotFound + value: -192 + - name: resFNotFound + value: -193 + - name: addResFailed + value: -194 + - name: rmvResFailed + value: -196 + +# #### + +- enum: + values: + - name: resAttrErr + value: -198 + - name: mapReadErr + value: -199 + comment: | + IMIV + +# #### + +- enum: + values: + - name: resourceInMemory + value: -188 + - name: inputOutOfBounds + value: -190 + comment: | + IMVI + +# #### + +- enum: + values: + - name: mapReadOnly + value: 128 + - name: mapCompact + value: 64 + - name: mapChanged + value: 32 + comment: | + resource file attribute masks + +# #### + +- lowmem: + name: TopMapHndl + type: Handle + address: 0xA50 + comment: | + ResourceMgr IMI-115 (true); + +# #### + +- lowmem: + name: SysMapHndl + type: Handle + address: 0xA54 + comment: | + ResourceMgr IMI-114 (true); + +# #### + +- lowmem: + name: SysMap + type: INTEGER + address: 0xA58 + comment: | + ResourceMgr IMI-114 (true); + +# #### + +- lowmem: + name: CurMap + type: INTEGER + address: 0xA5A + comment: | + ResourceMgr IMI-117 (true); + +# #### + +- lowmem: + name: resreadonly + type: INTEGER + address: 0xA5C + comment: | + ResourceMgr ToolEqu.a (false); + +# #### + +- lowmem: + name: ResLoad + type: Boolean + address: 0xA5E + comment: | + ResourceMgr IMI-118 (true); + +# #### + +- lowmem: + name: ResErr + type: INTEGER + address: 0xA60 + comment: | + ResourceMgr IMI-118 (true); + +# #### + +- lowmem: + name: ResErrProc + type: ProcPtr + address: 0xAF2 + comment: | + ResourceMgr IMI-116 (true); + +# #### + +- lowmem: + name: SysResName + type: Byte[20] + address: 0xAD8 + comment: | + ResourceMgr IMI-114 (true); + +# #### + +- lowmem: + name: RomMapInsert + type: Byte + address: 0xB9E + comment: | + ResourceMgr IMIV-19 (false); + +# #### + +- lowmem: + name: TmpResLoad + type: Byte + address: 0xB9F + comment: | + ResourceMgr IMIV-19 (false); + +# #### + +- dispatcher: + name: ResourceDispatch + trap: 0xA822 + selector-location: D0<0xF> + +# #### + +- executor_only: + code: | + RAW_68K_TRAP(ResourceStub, 0xA0FC); // defined in emustubs.cpp + +# #### + +- function: + name: SetResLoad + args: + - name: load + type: Boolean + trap: 0xA99B + executor: C_ + +# #### + +- function: + name: CountResources + return: INTEGER + args: + - name: typ + type: ResType + trap: 0xA99C + executor: C_ + +# #### + +- function: + name: Count1Resources + return: INTEGER + args: + - name: typ + type: ResType + trap: 0xA80D + executor: C_ + +# #### + +- function: + name: GetIndResource + return: Handle + args: + - name: typ + type: ResType + - name: indx + type: INTEGER + trap: 0xA99D + executor: C_ + +# #### + +- function: + name: Get1IndResource + return: Handle + args: + - name: typ + type: ResType + - name: i + type: INTEGER + trap: 0xA80E + executor: C_ + +# #### + +- function: + name: GetResource + return: Handle + args: + - name: typ + type: ResType + - name: id + type: INTEGER + trap: 0xA9A0 + executor: C_ + +# #### + +- function: + name: Get1Resource + return: Handle + args: + - name: typ + type: ResType + - name: id + type: INTEGER + trap: 0xA81F + executor: C_ + +# #### + +- function: + name: GetNamedResource + return: Handle + args: + - name: typ + type: ResType + - name: nam + type: ConstStringPtr + trap: 0xA9A1 + executor: C_ + +# #### + +- function: + name: Get1NamedResource + return: Handle + args: + - name: typ + type: ResType + - name: s + type: ConstStringPtr + trap: 0xA820 + executor: C_ + +# #### + +- function: + name: LoadResource + args: + - name: res + type: Handle + trap: 0xA9A2 + executor: C_ + +# #### + +- function: + name: ReleaseResource + args: + - name: res + type: Handle + trap: 0xA9A3 + executor: C_ + +# #### + +- function: + name: DetachResource + args: + - name: res + type: Handle + trap: 0xA992 + executor: C_ + +# #### + +- function: + name: UniqueID + return: INTEGER + args: + - name: typ + type: ResType + trap: 0xA9C1 + executor: C_ + +# #### + +- function: + name: Unique1ID + return: INTEGER + args: + - name: typ + type: ResType + trap: 0xA810 + executor: C_ + +# #### + +- function: + name: GetResInfo + args: + - name: res + type: Handle + - name: id1 + type: INTEGER* + - name: typ + type: ResType* + - name: name + type: StringPtr + trap: 0xA9A8 + executor: C_ + +# #### + +- function: + name: GetResAttrs + return: INTEGER + args: + - name: res + type: Handle + trap: 0xA9A6 + executor: C_ + +# #### + +- function: + name: GetResourceSizeOnDisk + return: LONGINT + args: + - name: res + type: Handle + trap: 0xA9A5 + executor: C_ + +# #### + +- function: + name: CountTypes + return: INTEGER + trap: 0xA99E + executor: C_ + +# #### + +- function: + name: Count1Types + return: INTEGER + trap: 0xA81C + executor: C_ + +# #### + +- function: + name: GetIndType + args: + - name: typ + type: ResType* + - name: indx + type: INTEGER + trap: 0xA99F + executor: C_ + +# #### + +- function: + name: Get1IndType + args: + - name: typ + type: ResType* + - name: indx + type: INTEGER + trap: 0xA80F + executor: C_ + +# #### + +- function: + name: GetMaxResourceSize + return: LONGINT + args: + - name: h + type: Handle + trap: 0xA821 + executor: C_ + +# #### + +- function: + name: RsrcMapEntry + return: LONGINT + args: + - name: h + type: Handle + trap: 0xA9C5 + executor: C_ + +# #### + +- function: + name: RGetResource + return: Handle + args: + - name: typ + type: ResType + - name: id + type: INTEGER + trap: 0xA80C + executor: C_ + +# #### + +- function: + name: InitResources + return: INTEGER + trap: 0xA995 + executor: C_ + +# #### + +- function: + name: RsrcZoneInit + trap: 0xA996 + executor: C_ + +# #### + +- function: + name: ResError + return: INTEGER + trap: 0xA9AF + executor: C_ + +# #### + +- function: + name: GetResFileAttrs + return: INTEGER + args: + - name: rn + type: INTEGER + trap: 0xA9F6 + executor: C_ + +# #### + +- function: + name: SetResFileAttrs + args: + - name: rn + type: INTEGER + - name: attrs + type: INTEGER + trap: 0xA9F7 + executor: C_ + +# #### + +- function: + name: SetResInfo + args: + - name: res + type: Handle + - name: id + type: INTEGER + - name: name + type: ConstStringPtr + trap: 0xA9A9 + executor: C_ + +# #### + +- function: + name: SetResAttrs + args: + - name: res + type: Handle + - name: attrs + type: INTEGER + trap: 0xA9A7 + executor: C_ + +# #### + +- function: + name: ChangedResource + args: + - name: res + type: Handle + trap: 0xA9AA + executor: C_ + +# #### + +- function: + name: AddResource + args: + - name: data + type: Handle + - name: typ + type: ResType + - name: id + type: INTEGER + - name: name + type: ConstStringPtr + trap: 0xA9AB + executor: C_ + +# #### + +- function: + name: RemoveResource + args: + - name: res + type: Handle + trap: 0xA9AD + executor: C_ + +# #### + +- function: + name: UpdateResFile + args: + - name: rn + type: INTEGER + trap: 0xA999 + executor: C_ + +# #### + +- function: + name: WriteResource + args: + - name: res + type: Handle + trap: 0xA9B0 + executor: C_ + +# #### + +- function: + name: SetResPurge + args: + - name: install + type: Boolean + trap: 0xA993 + executor: C_ + +# #### + +- function: + name: CreateResFile + args: + - name: fn + type: ConstStringPtr + trap: 0xA9B1 + executor: C_ + +# #### + +- function: + name: OpenRFPerm + return: INTEGER + args: + - name: fn + type: ConstStringPtr + - name: vref + type: INTEGER + - name: perm + type: Byte + trap: 0xA9C4 + executor: C_ + +# #### + +- function: + name: OpenResFile + return: INTEGER + args: + - name: fn + type: ConstStringPtr + trap: 0xA997 + executor: C_ + +# #### + +- function: + name: CloseResFile + args: + - name: rn + type: INTEGER + trap: 0xA99A + executor: C_ + +# #### + +- function: + name: CurResFile + return: INTEGER + trap: 0xA994 + executor: C_ + +# #### + +- function: + name: HomeResFile + return: INTEGER + args: + - name: res + type: Handle + trap: 0xA9A4 + executor: C_ + +# #### + +- function: + name: UseResFile + args: + - name: rn + type: INTEGER + trap: 0xA998 + executor: C_ + +# #### + +- function: + name: ReadPartialResource + args: + - name: resource + type: Handle + - name: offset + type: int32_t + - name: buffer + type: Ptr + - name: count + type: int32_t + dispatcher: ResourceDispatch + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: WritePartialResource + args: + - name: resource + type: Handle + - name: offset + type: int32_t + - name: buffer + type: Ptr + - name: count + type: int32_t + dispatcher: ResourceDispatch + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: SetResourceSize + args: + - name: resource + type: Handle + - name: size + type: int32_t + dispatcher: ResourceDispatch + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: GetNextFOND + return: Handle + args: + - name: fondHandle + type: Handle + dispatcher: ResourceDispatch + selector: 0x000A + executor: C_ diff --git a/defs/SANE.yaml b/defs/SANE.yaml new file mode 100644 index 0000000..2592ab0 --- /dev/null +++ b/defs/SANE.yaml @@ -0,0 +1,839 @@ +- struct: + name: comp_t + members: + - name: val + type: int64_t + comment: | + Big-endian 64 bit "comp" data type. Note that this has a NaN value! + typedef union { + struct + { + ULONGINT hi; + ULONGINT lo; + } hilo; + signed long long val; + } comp_t; + size: 8 + +# #### + +- struct: + name: x80_t + members: + - name: sgn_and_exp + type: uint16_t + - name: mantissa + type: uint64_t + comment: | + "Packed" IEEE 80 bit FP representation (zero field omitted). + size: 10 + +# #### + +- typedef: + name: extended80 + type: x80_t + comment: | + For backwards compatibility with old stuff. + +# #### + +- typedef: + name: comp + type: comp_t + +# #### + +- executor_only: + code: | + /* Begin old stuff: + This only makes sense on the 68k. */ + #if defined(mc68000) + +# #### + +- struct: + name: extended96 + members: + - name: exp + type: INTEGER + - name: zero + type: INTEGER + - name: man + type: INTEGER[4] + +# #### + +- executor_only: + code: | + #endif + +# #### + +- enum: + values: + - name: SIGDIGLEN + value: 20 + +# #### + +- struct: + name: Decimal + members: + - name: sgn + type: uint8_t + - name: unused_filler + type: uint8_t + - name: exp + type: INTEGER + - name: sig + type: uint8_t[SIGDIGLEN] + size: 24 + +# #### + +- enum: + values: + - name: FloatDecimal + - name: FixedDecimal + value: 256 + name: toobigdecformstyle_t + +# #### + +- typedef: + name: DecFormStyle + type: INTEGER + +# #### + +- enum: + values: + - name: DECIMALTYPEMASK + value: 0x0100 + +# #### + +- enum: + values: + - name: SNaN + value: 1 + - name: QNaN + - name: Infinite + - name: ZeroNum + - name: NormalNum + - name: DenormalNum + name: NumClass + +# #### + +- struct: + name: DecForm + members: + - name: style + type: DecFormStyle + - name: digits + type: INTEGER + size: 4 + +# #### + +- typedef: + name: Decstr + type: char* + +# #### + +- enum: + values: + - name: FX_OPERAND + value: 0x0000 + - name: FD_OPERAND + value: 0x0800 + - name: FS_OPERAND + value: 0x1000 + - name: FC_OPERAND + value: 0x3000 + - name: FI_OPERAND + value: 0x2000 + - name: FL_OPERAND + value: 0x2800 + +# #### + +- enum: + values: + - name: Fx2X_OPCODE + value: 0x000E + +# #### + +- enum: + values: + - name: FI2X + value: FI_OPERAND | Fx2X_OPCODE + +# #### + +- dispatcher: + name: Pack4 + trap: 0xA9EB + selector-location: StackWLookahead<0xFF> + +# #### + +- dispatcher: + name: Pack5 + trap: 0xA9EC + selector-location: StackWMasked<0xFF> + +# #### + +- dispatcher: + name: Pack7 + trap: 0xA9EE + selector-location: StackW + +# #### + +- function: + name: ROMlib_Fsetenv + args: + - name: dp + type: INTEGER* + - name: sel + type: INTEGER + dispatcher: Pack4 + selector: 0x01 + executor: C_ + +# #### + +- function: + name: ROMlib_Fgetenv + args: + - name: dp + type: INTEGER* + - name: sel + type: INTEGER + dispatcher: Pack4 + selector: 0x03 + executor: C_ + +# #### + +- function: + name: ROMlib_Fprocentry + args: + - name: dp + type: INTEGER* + - name: sel + type: INTEGER + dispatcher: Pack4 + selector: 0x17 + executor: C_ + +# #### + +- function: + name: ROMlib_Fprocexit + args: + - name: dp + type: INTEGER* + - name: sel + type: INTEGER + dispatcher: Pack4 + selector: 0x19 + executor: C_ + +# #### + +- function: + name: ROMlib_Ftestxcp + args: + - name: dp + type: INTEGER* + - name: sel + type: INTEGER + dispatcher: Pack4 + selector: 0x1B + executor: C_ + +# #### + +- function: + name: ROMlib_FsqrtX + args: + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x12 + executor: C_ + +# #### + +- function: + name: ROMlib_FscalbX + args: + - name: sp + type: INTEGER* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x18 + executor: C_ + +# #### + +- function: + name: ROMlib_FlogbX + args: + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x1A + executor: C_ + +# #### + +- function: + name: ROMlib_FabsX + args: + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x0F + executor: C_ + +# #### + +- function: + name: ROMlib_FnegX + args: + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x0D + executor: C_ + +# #### + +- function: + name: ROMlib_FrintX + args: + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x14 + executor: C_ + +# #### + +- function: + name: ROMlib_FtintX + args: + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x16 + executor: C_ + +# #### + +- function: + name: ROMlib_Fcpysgnx + args: + - name: sp + type: x80_t* + - name: dp + type: x80_t* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x11 + executor: C_ + +# #### + +- function: + name: ROMlib_Faddx + args: + - name: sp + type: void* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x00 + executor: C_ + +# #### + +- function: + name: ROMlib_Fsubx + args: + - name: sp + type: void* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x02 + executor: C_ + +# #### + +- function: + name: ROMlib_Fmulx + args: + - name: sp + type: void* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x04 + executor: C_ + +# #### + +- function: + name: ROMlib_Fdivx + args: + - name: sp + type: void* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x06 + executor: C_ + +# #### + +- function: + name: ROMlib_Fremx + args: + - name: sp + type: void* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x0C + executor: C_ + +# #### + +- function: + name: ROMlib_Fcmpx + args: + - name: sp + type: void* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x08 + executor: C_ + +# #### + +- function: + name: ROMlib_FcpXx + args: + - name: sp + type: void* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x0A + executor: C_ + +# #### + +- function: + name: ROMlib_FX2x + args: + - name: sp + type: extended80* + - name: dp + type: void* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x10 + executor: C_ + +# #### + +- function: + name: ROMlib_Fx2X + args: + - name: sp + type: void* + - name: dp + type: extended80* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x0E + executor: C_ + +# #### + +- function: + name: ROMlib_Fx2dec + args: + - name: sp2 + type: DecForm* + - name: sp + type: void* + - name: dp + type: Decimal* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x0B + executor: C_ + +# #### + +- function: + name: ROMlib_Fdec2x + args: + - name: sp + type: Decimal* + - name: dp + type: void* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x09 + executor: C_ + +# #### + +- function: + name: ROMlib_Fclassx + args: + - name: sp + type: void* + - name: dp + type: INTEGER* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x1C + executor: C_ + +# #### + +- function: + name: ROMlib_FlnX + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x00 + executor: C_ + +# #### + +- function: + name: ROMlib_Flog2X + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x02 + executor: C_ + +# #### + +- function: + name: ROMlib_Fln1X + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x04 + executor: C_ + +# #### + +- function: + name: ROMlib_Flog21X + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x06 + executor: C_ + +# #### + +- function: + name: ROMlib_FexpX + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x08 + executor: C_ + +# #### + +- function: + name: ROMlib_Fexp2X + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x0A + executor: C_ + +# #### + +- function: + name: ROMlib_Fexp1X + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x0C + executor: C_ + +# #### + +- function: + name: ROMlib_Fexp21X + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x0E + executor: C_ + +# #### + +- function: + name: ROMlib_Fxpwri + args: + - name: sp + type: INTEGER* + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x10 + executor: C_ + +# #### + +- function: + name: ROMlib_Fxpwry + args: + - name: sp + type: extended80* + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x12 + executor: C_ + +# #### + +- function: + name: ROMlib_Fcompound + args: + - name: sp2 + type: extended80* + - name: sp + type: extended80* + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x14 + executor: C_ + +# #### + +- function: + name: ROMlib_Fannuity + args: + - name: sp2 + type: extended80* + - name: sp + type: extended80* + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x16 + executor: C_ + +# #### + +- function: + name: ROMlib_FsinX + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x18 + executor: C_ + +# #### + +- function: + name: ROMlib_FcosX + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x1A + executor: C_ + +# #### + +- function: + name: ROMlib_FtanX + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x1C + executor: C_ + +# #### + +- function: + name: ROMlib_FatanX + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x1E + executor: C_ + +# #### + +- function: + name: ROMlib_FrandX + args: + - name: dp + type: extended80* + dispatcher: Pack5 + selector: 0x20 + executor: C_ + +# #### + +- function: + name: ROMlib_Fdec2str + args: + - name: sp2 + type: DecForm* + - name: sp + type: Decimal* + - name: dp + type: Decstr + dispatcher: Pack7 + selector: 0x03 + executor: C_ + +# #### + +- function: + name: ROMlib_Fcstr2dec + args: + - name: sp2 + type: Decstr + - name: sp + type: INTEGER* + - name: dp2 + type: Decimal* + - name: dp + type: Byte* + dispatcher: Pack7 + selector: 0x04 + executor: C_ + +# #### + +- function: + name: ROMlib_Fpstr2dec + args: + - name: sp2 + type: Decstr + - name: sp + type: INTEGER* + - name: dp2 + type: Decimal* + - name: dp + type: Byte* + dispatcher: Pack7 + selector: 0x02 + executor: C_ + +# #### + +- function: + name: ROMlib_Fsethv + args: + - name: hvp + type: LONGINT* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x05 + executor: C_ + +# #### + +- function: + name: ROMlib_Fgethv + args: + - name: hvp + type: LONGINT* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x07 + executor: C_ + +# #### + +- function: + name: ROMlib_FnextX + args: + - name: x + type: uint8_t* + - name: y + type: uint8_t* + - name: sel + type: uint16_t + dispatcher: Pack4 + selector: 0x13 + executor: C_ diff --git a/defs/ScrapMgr.yaml b/defs/ScrapMgr.yaml new file mode 100644 index 0000000..7722a28 --- /dev/null +++ b/defs/ScrapMgr.yaml @@ -0,0 +1,136 @@ +- enum: + values: + - name: noScrapErr + value: -100 + - name: noTypeErr + value: -102 + +# #### + +- struct: + name: ScrapStuff + members: + - name: scrapSize + type: LONGINT + - name: scrapHandle + type: Handle + - name: scrapCount + type: INTEGER + - name: scrapState + type: INTEGER + - name: scrapName + type: StringPtr + size: 16 + +# #### + +- typedef: + name: PScrapStuff + type: ScrapStuff* + +# #### + +- lowmem: + name: ScrapSize + type: LONGINT + address: 0x960 + comment: | + ScrapMgr IMI-457 (true); + +# #### + +- lowmem: + name: ScrapHandle + type: Handle + address: 0x964 + comment: | + ScrapMgr IMI-457 (true); + +# #### + +- lowmem: + name: ScrapCount + type: INTEGER + address: 0x968 + comment: | + ScrapMgr IMI-457 (true); + +# #### + +- lowmem: + name: ScrapState + type: INTEGER + address: 0x96A + comment: | + ScrapMgr IMI-457 (true); + +# #### + +- lowmem: + name: ScrapName + type: StringPtr + address: 0x96C + comment: | + ScrapMgr IMI-457 (true); + +# #### + +- function: + name: InfoScrap + return: PScrapStuff + trap: 0xA9F9 + executor: C_ + +# #### + +- function: + name: UnloadScrap + return: LONGINT + trap: 0xA9FA + executor: C_ + +# #### + +- function: + name: LoadScrap + return: LONGINT + trap: 0xA9FB + executor: C_ + +# #### + +- function: + name: ZeroScrap + return: LONGINT + trap: 0xA9FC + executor: C_ + +# #### + +- function: + name: PutScrap + return: LONGINT + args: + - name: len + type: LONGINT + - name: rest + type: ResType + - name: p + type: Ptr + trap: 0xA9FE + executor: C_ + +# #### + +- function: + name: GetScrap + return: LONGINT + args: + - name: h + type: Handle + - name: rest + type: ResType + - name: "off" + type: LONGINT* + trap: 0xA9FD + executor: C_ diff --git a/defs/ScriptMgr.yaml b/defs/ScriptMgr.yaml new file mode 100644 index 0000000..c7d9255 --- /dev/null +++ b/defs/ScriptMgr.yaml @@ -0,0 +1,1159 @@ +- typedef: + name: String2DateStatus + type: INTEGER + +# #### + +- enum: + values: + - name: smRoman + value: 0 + +# #### + +- enum: + values: + - name: smCharPunct + value: 0 + - name: smCharAscii + value: 1 + - name: smCharEuro + value: 7 + +# #### + +- enum: + values: + - name: smPunctNormal + value: 0x0000 + - name: smPunctNumber + value: 0x0100 + - name: smPunctSymbol + value: 0x0200 + - name: smPunctBlank + value: 0x0300 + +# #### + +- enum: + values: + - name: smCharLeft + value: 0x0000 + - name: smCharRight + value: 0x2000 + +# #### + +- enum: + values: + - name: smCharLower + value: 0x0000 + - name: smCharUpper + value: 0x4000 + +# #### + +- enum: + values: + - name: smChar1byte + value: 0x0000 + - name: smChar2byte + value: 0x8000 + +# #### + +- enum: + values: + - name: smTransAscii + value: 0 + - name: smTransNative + value: 1 + - name: smTransLower + value: 16384 + - name: smTransUpper + value: 32768 + - name: smMaskAscii + value: 1 + - name: smMaskNative + value: 2 + - name: smMaskAll + value: -1 + +# #### + +- enum: + values: + - name: smScriptVersion + value: 0 + - name: smScriptMunged + value: 2 + - name: smScriptEnabled + value: 4 + - name: smScriptRight + value: 6 + - name: smScriptJust + value: 8 + - name: smScriptRedraw + value: 10 + - name: smScriptSysFond + value: 12 + - name: smScriptAppFond + value: 14 + - name: smScriptNumber + value: 16 + - name: smScriptDate + value: 18 + - name: smScriptSort + value: 20 + - name: smScriptRsvd1 + value: 22 + - name: smScriptRsvd2 + value: 24 + - name: smScriptRsvd3 + value: 26 + - name: smScriptRsvd4 + value: 28 + - name: smScriptRsvd5 + value: 30 + - name: smScriptKeys + value: 32 + - name: smScriptIcon + value: 34 + - name: smScriptPrint + value: 36 + - name: smScriptTrap + value: 38 + - name: smScriptCreator + value: 40 + - name: smScriptFile + value: 42 + - name: smScriptName + value: 44 + +# #### + +- enum: + values: + - name: smVersion + value: 0 + - name: smMunged + value: 2 + - name: smEnabled + value: 4 + - name: smBiDirect + value: 6 + - name: smFontForce + value: 8 + - name: smIntlForce + value: 10 + - name: smForced + value: 12 + - name: smDefault + value: 14 + - name: smPrint + value: 16 + - name: smSysScript + value: 18 + - name: smAppScript + value: 20 + - name: smKeyScript + value: 22 + - name: smSysRef + value: 24 + - name: smKeyCache + value: 26 + - name: smKeySwap + value: 28 + +# #### + +- enum: + values: + - name: smKCHRCache + value: 38 + +# #### + +- enum: + values: + - name: smVerbNotFound + value: -1 + +# #### + +- enum: + values: + - name: smBreakWord + value: 0 + - name: smBreakChar + value: 1 + - name: smBreakOverflow + value: 2 + +# #### + +- enum: + values: + - name: NotTruncated + value: 0 + - name: Truncated + value: 1 + - name: TruncErr + value: -1 + comment: | + TruncText return codes + +# #### + +- typedef: + name: StyledLineBreakCode + type: uint8_t + +# #### + +- struct: + name: DateCacheRec + members: + - name: hidden + type: int16_t[256] + size: 512 + +# #### + +- typedef: + name: DateCachePtr + type: DateCacheRec* + +# #### + +- struct: + name: LongDateRec + members: + - name: era + type: int16_t + - name: year + type: int16_t + - name: month + type: int16_t + - name: day + type: int16_t + - name: hour + type: int16_t + - name: minute + type: int16_t + - name: second + type: int16_t + - name: dayOfWeek + type: int16_t + - name: dayOfYear + type: int16_t + - name: weekOfYear + type: int16_t + - name: pm + type: int16_t + - name: res1 + type: int16_t + - name: res2 + type: int16_t + - name: res3 + type: int16_t + size: 28 + +# #### + +- typedef: + name: LongDatePtr + type: LongDateRec* + +# #### + +- typedef: + name: TruncCode + type: INTEGER + +# #### + +- typedef: + name: JustStyleCode + type: int16_t + +# #### + +- typedef: + name: CharByteTable + type: int8_t[256] + +# #### + +- typedef: + name: ScriptRunStatus + type: int16_t + comment: | + Not sure this is correct, since in IM + ScriptRunStatus is a record with two + Signed Bytes + +# #### + +- typedef: + name: FormatStatus + type: INTEGER + +# #### + +- struct: + name: NumFormatStringRec + members: + - name: fLength + type: Byte + - name: fVersion + type: Byte + - name: data + type: SignedByte[254] + size: 256 + +# #### + +- typedef: + name: WideChar + type: uint16_t + size: 2 + +# #### + +- struct: + members: + - name: size + type: INTEGER + - name: data + type: WideChar[10] + name: WideCharArr + size: 22 + +# #### + +- struct: + name: NumberParts + members: + - name: version + type: INTEGER + - name: data + type: WideChar[31] + - name: pePlus + type: WideCharArr + - name: peMinus + type: WideCharArr + - name: peMinusPlus + type: WideCharArr + - name: altNumTable + type: WideCharArr + - name: reserved + type: char[20] + size: 172 + +# #### + +- typedef: + name: Extended80 + type: extended80 + size: 10 + +# #### + +- typedef: + name: ToggleResults + type: int16_t + size: 2 + +# #### + +- typedef: + name: LongDateField + type: uint8_t + size: 1 + +# #### + +- typedef: + name: DateDelta + type: char + size: 1 + +# #### + +- struct: + name: TogglePB + members: + - name: togFlags + type: int32_t + - name: amChars + type: ResType + - name: pmChars + type: ResType + - name: reserved + type: int32_t[4] + size: 28 + +# #### + +- enum: + values: + - name: smSystemScript + value: -1 + +# #### + +- lowmem: + name: TESysJust + type: INTEGER + address: 0xBAC + comment: | + ScriptMgr ToolEqu.a (true-b); + +# #### + +- dispatcher: + name: ScriptUtil + trap: 0xA8B5 + selector-location: StackL + +# #### + +- function: + name: VisibleLength + return: LONGINT + args: + - name: textp + type: Ptr + - name: len + type: LONGINT + dispatcher: ScriptUtil + selector: 0x84080028 + executor: C_ + +# #### + +- function: + name: LongDateToSeconds + args: + - name: ldatep + type: LongDateRec* + - name: secs_outp + type: ULONGINT* + dispatcher: ScriptUtil + selector: 0x8008FFF2 + executor: C_ + +# #### + +- function: + name: LongSecondsToDate + args: + - name: secs_inp + type: ULONGINT* + - name: ldatep + type: LongDateRec* + dispatcher: ScriptUtil + selector: 0x8008FFF0 + executor: C_ + +# #### + +- function: + name: GetScriptManagerVariable + return: LONGINT + args: + - name: verb + type: INTEGER + dispatcher: ScriptUtil + selector: 0x84020008 + executor: C_ + +# #### + +- function: + name: SetScriptManagerVariable + return: OSErr + args: + - name: verb + type: INTEGER + - name: param + type: LONGINT + dispatcher: ScriptUtil + selector: 0x8206000A + executor: C_ + +# #### + +- function: + name: GetScriptVariable + return: LONGINT + args: + - name: script + type: INTEGER + - name: verb + type: INTEGER + dispatcher: ScriptUtil + selector: 0x8404000C + executor: C_ + +# #### + +- function: + name: SetScriptVariable + return: OSErr + args: + - name: script + type: INTEGER + - name: verb + type: INTEGER + - name: param + type: LONGINT + dispatcher: ScriptUtil + selector: 0x8208000E + executor: C_ + +# #### + +- function: + name: FontToScript + return: INTEGER + args: + - name: fontnum + type: INTEGER + dispatcher: ScriptUtil + selector: 0x82020006 + executor: C_ + +# #### + +- function: + name: Transliterate + return: INTEGER + args: + - name: srch + type: Handle + - name: dsth + type: Handle + - name: target + type: INTEGER + - name: srcmask + type: LONGINT + dispatcher: ScriptUtil + selector: 0x820E0018 + executor: C_ + +# #### + +- function: + name: FontScript + return: INTEGER + dispatcher: ScriptUtil + selector: 0x82000000 + executor: C_ + +# #### + +- function: + name: IntlScript + return: INTEGER + dispatcher: ScriptUtil + selector: 0x82000002 + executor: C_ + +# #### + +- function: + name: KeyScript + args: + - name: scriptcode + type: INTEGER + dispatcher: ScriptUtil + selector: 0x80020004 + executor: C_ + +# #### + +- function: + name: CharType + return: INTEGER + args: + - name: textbufp + type: Ptr + - name: offset + type: INTEGER + dispatcher: ScriptUtil + selector: 0x82060012 + executor: C_ + +# #### + +- function: + name: MeasureJust + args: + - name: textbufp + type: Ptr + - name: length + type: INTEGER + - name: slop + type: INTEGER + - name: charlocs + type: Ptr + dispatcher: ScriptUtil + selector: 0x800C0020 + executor: C_ + +# #### + +- function: + name: Pixel2Char + return: INTEGER + args: + - name: textbufp + type: Ptr + - name: len + type: INTEGER + - name: slop + type: INTEGER + - name: pixwidth + type: INTEGER + - name: leftsidep + type: Boolean* + dispatcher: ScriptUtil + selector: 0x820E0014 + executor: C_ + +# #### + +- function: + name: Char2Pixel + return: INTEGER + args: + - name: textbufp + type: Ptr + - name: len + type: INTEGER + - name: slop + type: INTEGER + - name: offset + type: INTEGER + - name: dir + type: SignedByte + dispatcher: ScriptUtil + selector: 0x820C0016 + executor: C_ + +# #### + +- function: + name: FindWord + args: + - name: textbufp + type: Ptr + - name: length + type: INTEGER + - name: offset + type: INTEGER + - name: leftside + type: Boolean + - name: breaks + type: Ptr + - name: offsets + type: INTEGER* + dispatcher: ScriptUtil + selector: 0x8012001A + executor: C_ + +# #### + +- function: + name: HiliteText + args: + - name: textbufp + type: Ptr + - name: firstoffset + type: INTEGER + - name: secondoffset + type: INTEGER + - name: offsets + type: INTEGER* + dispatcher: ScriptUtil + selector: 0x800E001C + executor: C_ + +# #### + +- function: + name: DrawJust + args: + - name: textbufp + type: Ptr + - name: length + type: INTEGER + - name: slop + type: INTEGER + dispatcher: ScriptUtil + selector: 0x8008001E + executor: C_ + +# #### + +- function: + name: StringToTime + return: String2DateStatus + args: + - name: textp + type: Ptr + - name: len + type: LONGINT + - name: cachep + type: Ptr + - name: lenusedp + type: LONGINT* + - name: datetimep + type: Ptr* + dispatcher: ScriptUtil + selector: 0x8214FFF4 + executor: C_ + +# #### + +- function: + name: GetMBarHeight + return: INTEGER + +# #### + +- function: + name: GetSysDirection + return: INTEGER + +# #### + +- function: + name: SetSysDirection + args: + - name: just + type: INTEGER + +# #### + +- function: + name: InitDateCache + return: OSErr + args: + - name: theCache + type: DateCachePtr + dispatcher: ScriptUtil + selector: 0x8204FFF8 + executor: C_ + +# #### + +- function: + name: CharByte + return: INTEGER + args: + - name: textBuf + type: Ptr + - name: textOffset + type: INTEGER + dispatcher: ScriptUtil + selector: 0x82060010 + executor: C_ + +# #### + +- function: + name: StringToDate + return: String2DateStatus + args: + - name: text + type: Ptr + - name: length + type: int32_t + - name: cache + type: DateCachePtr + - name: length_used_ret + type: int32_t* + - name: date_time + type: LongDatePtr + dispatcher: ScriptUtil + selector: 0x8214FFF6 + executor: C_ + +# #### + +- function: + name: StyledLineBreak + return: StyledLineBreakCode + args: + - name: textp + type: Ptr + - name: length + type: int32_t + - name: text_start + type: int32_t + - name: text_end + type: int32_t + - name: flags + type: int32_t + - name: text_width_fp + type: Fixed* + - name: text_offset + type: int32_t* + dispatcher: ScriptUtil + selector: 0x821CFFFE + executor: C_ + +# #### + +- function: + name: MeasureJustified + args: + - name: text + type: Ptr + - name: length + type: int32_t + - name: slop + type: Fixed + - name: charLocs + type: Ptr + - name: run_pos + type: JustStyleCode + - name: numer + type: Point + - name: denom + type: Point + dispatcher: ScriptUtil + selector: 0x801A0034 + executor: C_ + +# #### + +- function: + name: ParseTable + return: Boolean + args: + - name: table + type: CharByteTable + dispatcher: ScriptUtil + selector: 0x82040022 + executor: C_ + +# #### + +- function: + name: FillParseTable + return: Boolean + args: + - name: table + type: CharByteTable + - name: script + type: ScriptCode + dispatcher: ScriptUtil + selector: 0xC2040022 + executor: C_ + +# #### + +- function: + name: ReplaceText + return: INTEGER + args: + - name: base_text + type: Handle + - name: subst_text + type: Handle + - name: key + type: Str15 + dispatcher: ScriptUtil + selector: 0x820CFFDC + executor: C_ + +# #### + +- function: + name: TruncString + return: INTEGER + args: + - name: width + type: INTEGER + - name: string + type: Str255 + - name: code + type: TruncCode + dispatcher: ScriptUtil + selector: 0x8208FFE0 + executor: C_ + +# #### + +- function: + name: StringToExtended + return: FormatStatus + args: + - name: string + type: Str255 + - name: formatp + type: NumFormatStringRec* + - name: partsp + type: NumberParts* + - name: xp + type: Extended80* + dispatcher: ScriptUtil + selector: 0x8210FFE6 + executor: C_ + +# #### + +- function: + name: ExtendedToString + return: FormatStatus + args: + - name: xp + type: Extended80* + - name: formatp + type: NumFormatStringRec* + - name: partsp + type: NumberParts* + - name: string + type: Str255 + dispatcher: ScriptUtil + selector: 0x8210FFE8 + executor: C_ + +# #### + +- function: + name: StringToFormatRec + return: FormatStatus + args: + - name: in_string + type: ConstStringPtr + - name: partsp + type: NumberParts* + - name: out_string + type: NumFormatStringRec* + dispatcher: ScriptUtil + selector: 0x820CFFEC + executor: C_ + +# #### + +- function: + name: ToggleDate + return: ToggleResults + args: + - name: lsecsp + type: LongDateTime* + - name: field + type: LongDateField + - name: delta + type: DateDelta + - name: ch + type: INTEGER + - name: paramsp + type: TogglePB* + dispatcher: ScriptUtil + selector: 0x820EFFEE + executor: C_ + +# #### + +- function: + name: PortionLine + return: Fixed + args: + - name: textPtr + type: Ptr + - name: textLen + type: LONGINT + - name: styleRunPosition + type: JustStyleCode + - name: numer + type: Point + - name: denom + type: Point + dispatcher: ScriptUtil + selector: 0x84120036 + executor: C_ + +# #### + +- function: + name: DrawJustified + args: + - name: textPtr + type: Ptr + - name: textLength + type: LONGINT + - name: slop + type: Fixed + - name: styleRunPosition + type: JustStyleCode + - name: numer + type: Point + - name: denom + type: Point + dispatcher: ScriptUtil + selector: 0x80160032 + executor: C_ + +# #### + +- function: + name: FindScriptRun + return: ScriptRunStatus + args: + - name: textPtr + type: Ptr + - name: textLen + type: LONGINT + - name: lenUsedp + type: LONGINT* + dispatcher: ScriptUtil + selector: 0x820C0026 + executor: C_ + +# #### + +- function: + name: PixelToChar + return: INTEGER + args: + - name: textBuf + type: Ptr + - name: textLen + type: LONGINT + - name: slop + type: Fixed + - name: pixelWidth + type: Fixed + - name: leadingEdgep + type: Boolean* + - name: widthRemainingp + type: Fixed* + - name: styleRunPosition + type: JustStyleCode + - name: numer + type: Point + - name: denom + type: Point + dispatcher: ScriptUtil + selector: 0x8222002E + executor: C_ + +# #### + +- function: + name: CharToPixel + return: INTEGER + args: + - name: textBuf + type: Ptr + - name: textLen + type: LONGINT + - name: slop + type: Fixed + - name: offset + type: LONGINT + - name: direction + type: INTEGER + - name: styleRunPosition + type: JustStyleCode + - name: numer + type: Point + - name: denom + type: Point + dispatcher: ScriptUtil + selector: 0x821C0030 + executor: C_ + +# #### + +- executor_only: + code: | + extern void C_LowercaseText( + Ptr textp, + INTEGER len, + ScriptCode script); + PASCAL_FUNCTION(LowercaseText); //, 0xA8B5, ScriptUtil); + + extern void C_UppercaseText( + Ptr textp, + INTEGER len, + ScriptCode script); + PASCAL_FUNCTION(UppercaseText); //, 0xA8B5, ScriptUtil); + + extern void C_StripDiacritics( + Ptr textp, + INTEGER len, + ScriptCode script); + PASCAL_FUNCTION(StripDiacritics); //, 0xA8B5, ScriptUtil); + + extern void C_UppercaseStripDiacritics( + Ptr textp, + INTEGER len, + ScriptCode script); + PASCAL_FUNCTION(UppercaseStripDiacritics); //, 0xA8B5, ScriptUtil); + + // the above four functions are actually one entry point on 68K: + extern void C_TextUtilFunctions( + short selector, + Ptr textp, + INTEGER len, + ScriptCode script); + PASCAL_SUBTRAP(TextUtilFunctions, 0xA8B5, 0x800AFFB6, ScriptUtil); + +# #### + +- function: + name: CharacterByteType + return: INTEGER + args: + - name: textBuf + type: Ptr + - name: textOffset + type: INTEGER + - name: script + type: ScriptCode + dispatcher: ScriptUtil + selector: 0xC2060010 + executor: C_ + +# #### + +- function: + name: CharacterType + return: INTEGER + args: + - name: textbufp + type: Ptr + - name: offset + type: INTEGER + - name: script + type: ScriptCode + dispatcher: ScriptUtil + selector: 0xC2060012 + executor: C_ + +# #### + +- function: + name: TransliterateText + return: INTEGER + args: + - name: srch + type: Handle + - name: dsth + type: Handle + - name: target + type: INTEGER + - name: srcmask + type: LONGINT + - name: script + type: ScriptCode + dispatcher: ScriptUtil + selector: 0xC20E0018 + executor: C_ diff --git a/defs/SegmentLdr.yaml b/defs/SegmentLdr.yaml new file mode 100644 index 0000000..cbfe5c8 --- /dev/null +++ b/defs/SegmentLdr.yaml @@ -0,0 +1,165 @@ +- function: + name: ExitToShell + trap: 0xA9F4 + executor: C_ + +# #### + +- enum: + values: + - name: appOpen + value: 0 + - name: appPrint + value: 1 + +# #### + +- struct: + name: AppFile + members: + - name: vRefNum + type: INTEGER + - name: fType + type: OSType + - name: versNum + type: INTEGER + - name: fName + type: Str255 + size: 264 + +# #### + +- lowmem: + name: loadtrap + type: Byte + address: 0x12D + comment: | + SegmentLdr SysEqu.a (true-b); + +# #### + +- lowmem: + name: FinderName + type: Byte[16] + address: 0x2E0 + comment: | + SegmentLdr IMII-59 (true); + +# #### + +- lowmem: + name: CurApRefNum + type: INTEGER + address: 0x900 + comment: | + SegmentLdr IMII-58 (true); + +# #### + +- lowmem: + name: CurApName + type: Byte[34] + address: 0x910 + comment: | + * NOTE: IMIII says CurApName is 32 bytes long, but it looks to me like + * it is really 34 bytes long. + SegmentLdr IMII-58 (true); + +# #### + +- lowmem: + name: CurJTOffset + type: INTEGER + address: 0x934 + comment: | + SegmentLdr IMII-62 (true-b); + +# #### + +- lowmem: + name: CurPageOption + type: INTEGER + address: 0x936 + comment: | + SegmentLdr IMII-60 (true); + +# #### + +- lowmem: + name: AppParmHandle + type: Handle + address: 0xAEC + comment: | + SegmentLdr IMII-57 (true); + +# #### + +- function: + name: CountAppFiles + args: + - name: messagep + type: INTEGER* + - name: countp + type: INTEGER* + +# #### + +- function: + name: GetAppFiles + args: + - name: index + type: INTEGER + - name: filep + type: AppFile* + +# #### + +- function: + name: ClrAppFiles + args: + - name: index + type: INTEGER + +# #### + +- executor_only: + code: | + extern void Launch(ConstStringPtr appl, INTEGER vrefnum); + extern void Chain(ConstStringPtr appl, INTEGER vrefnum); + +# #### + +- function: + name: GetAppParms + args: + - name: namep + type: StringPtr + - name: rnp + type: INTEGER* + - name: aphandp + type: Handle* + trap: 0xA9F5 + executor: C_ + +# #### + +- function: + name: UnloadSeg + args: + - name: addr + type: void* + trap: 0xA9F1 + executor: C_ + +# #### + +- enum: + values: + - name: _LoadSeg + value: 0xA9F0 + - name: _UnLoadSeg + value: 0xA9F1 + - name: _Launch + value: 0xA9F2 + - name: _Chain + value: 0xA9F3 diff --git a/defs/Serial.yaml b/defs/Serial.yaml new file mode 100644 index 0000000..21d4118 --- /dev/null +++ b/defs/Serial.yaml @@ -0,0 +1,356 @@ +- enum: + values: + - name: baud300 + value: 380 + - name: baud600 + value: 189 + - name: baud1200 + value: 94 + - name: baud1800 + value: 62 + - name: baud2400 + value: 46 + - name: baud3600 + value: 30 + - name: baud4800 + value: 22 + - name: baud7200 + value: 14 + - name: baud9600 + value: 10 + - name: baud14400 + value: 6 + - name: baud19200 + value: 4 + - name: baud28800 + value: 2 + - name: baud38400 + value: 1 + - name: baud57600 + value: 0 + +# #### + +- enum: + values: + - name: stop10 + value: 16384 + - name: stop15 + value: -32768 + - name: stop20 + value: -16384 + +# #### + +- enum: + values: + - name: noParity + value: 0 + - name: oddParity + value: 4096 + - name: evenParity + value: 12288 + +# #### + +- enum: + values: + - name: data5 + value: 0 + - name: data6 + value: 2048 + - name: data7 + value: 1024 + - name: data8 + value: 3072 + +# #### + +- enum: + values: + - name: swOverrunErr + value: 1 + - name: parityErr + value: 16 + - name: hwOverrunErr + value: 32 + - name: framingErr + value: 64 + +# #### + +- enum: + values: + - name: ctsEvent + value: 32 + - name: breakEvent + value: 128 + +# #### + +- enum: + values: + - name: xOffWasSent + value: 0x80 + +# #### + +- typedef: + name: SPortSel + type: SignedByte + +# #### + +- enum: + values: + - name: sPortA + value: 0 + - name: sPortB + value: 1 + +# #### + +- enum: + values: + - name: kSERDConfiguration + value: 8 + - name: kSERDInputBuffer + value: 9 + - name: kSERDSerHShake + value: 10 + - name: kSERDClearBreak + value: 11 + - name: kSERDSetBreak + value: 12 + - name: kSERDBaudRate + value: 13 + - name: kSERDHandshake + value: 14 + - name: kSERDClockMIDI + value: 15 + - name: kSERDMiscOptions + value: 16 + - name: kSERDAssertDTR + value: 17 + - name: kSERDNegateDTR + value: 18 + - name: kSERDSetPEChar + value: 19 + - name: kSERDSetPEAltChar + value: 20 + - name: kSERDSetXOffFlag + value: 21 + - name: kSERDClearXOffFlag + value: 22 + - name: kSERDSendXOn + value: 23 + - name: kSERDSendXOnOut + value: 24 + - name: kSERDSendXOff + value: 25 + - name: kSERDSendXOffOut + value: 26 + - name: kSERDResetChannel + value: 27 + - name: kSERDHandshakeRS232 + value: 28 + - name: kSERDStickParity + value: 29 + - name: kSERDAssertRTS + value: 30 + - name: kSERDNegateRTS + value: 31 + - name: kSERD115KBaud + value: 115 + - name: kSERD230KBaud + value: 230 + comment: | + Serial driver control codes + +# #### + +- enum: + values: + - name: kSERDInputCount + value: 2 + - name: kSERDStatus + value: 8 + - name: kSERDVersion + value: 9 + - name: kSERDGetDCD + value: 256 + comment: | + Serial driver status codes + +# #### + +- struct: + name: SerShk + members: + - name: fXOn + type: Byte + - name: fCTS + type: Byte + - name: xOn + type: Byte + - name: xOff + type: Byte + - name: errs + type: Byte + - name: evts + type: Byte + - name: fInX + type: Byte + - name: "null" + type: Byte + size: 8 + +# #### + +- struct: + name: SerStaRec + members: + - name: cumErrs + type: Byte + - name: xOffSent + type: Byte + - name: rdPend + type: Byte + - name: wrPend + type: Byte + - name: ctsHold + type: Byte + - name: xOffHold + type: Byte + - name: dsrHold + type: Byte + comment: | + unimplemented + - name: modemStatus + type: Byte + comment: | + unimplemented + size: 8 + +# #### + +- executor_only: + code: | + const char *const MODEMINAME = ".AIn"; + const char *const MODEMONAME = ".AOut"; + const char *const PRNTRINAME = ".AIn"; + const char *const PRNTRONAME = ".AOut"; + +# #### + +- enum: + values: + - name: MODEMIRNUM + value: -6 + - name: MODEMORNUM + value: -7 + - name: PRNTRIRNUM + value: -8 + - name: PRNTRORNUM + value: -9 + +# #### + +- function: + name: RAMSDOpen + return: OSErr + args: + - name: port + type: SPortSel + executor: true + +# #### + +- function: + name: RAMSDClose + args: + - name: port + type: SPortSel + executor: true + +# #### + +- function: + name: SerReset + return: OSErr + args: + - name: rn + type: INTEGER + - name: config + type: INTEGER + executor: true + +# #### + +- function: + name: SerSetBuf + return: OSErr + args: + - name: rn + type: INTEGER + - name: p + type: Ptr + - name: len + type: INTEGER + executor: true + +# #### + +- function: + name: SerHShake + return: OSErr + args: + - name: rn + type: INTEGER + - name: flags + type: const SerShk* + executor: true + +# #### + +- function: + name: SerSetBrk + return: OSErr + args: + - name: rn + type: INTEGER + executor: true + +# #### + +- function: + name: SerClrBrk + return: OSErr + args: + - name: rn + type: INTEGER + executor: true + +# #### + +- function: + name: SerGetBuf + return: OSErr + args: + - name: rn + type: INTEGER + - name: lp + type: LONGINT* + executor: true + +# #### + +- function: + name: SerStatus + return: OSErr + args: + - name: rn + type: INTEGER + - name: serstap + type: SerStaRec* + executor: true diff --git a/defs/ShutDown.yaml b/defs/ShutDown.yaml new file mode 100644 index 0000000..85aef81 --- /dev/null +++ b/defs/ShutDown.yaml @@ -0,0 +1,59 @@ +- enum: + values: + - name: sdOnPowerOff + value: 1 + - name: sdOnRestart + value: 2 + - name: sdOnUnmount + value: 4 + - name: sdOnDrivers + value: 8 + - name: sdOnRestartOrPower + value: sdOnPowerOff | sdOnRestart + +# #### + +- dispatcher: + name: ShutDown + trap: 0xA895 + selector-location: StackW + +# #### + +- function: + name: ShutDwnPower + dispatcher: ShutDown + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: ShutDwnStart + dispatcher: ShutDown + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: ShutDwnInstall + args: + - name: shutdown_proc + type: ProcPtr + - name: flags + type: int16_t + dispatcher: ShutDown + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: ShutDwnRemove + args: + - name: shutdown_proc + type: ProcPtr + dispatcher: ShutDown + selector: 0x0004 + executor: C_ diff --git a/defs/SoundDvr.yaml b/defs/SoundDvr.yaml new file mode 100644 index 0000000..7cdde40 --- /dev/null +++ b/defs/SoundDvr.yaml @@ -0,0 +1,221 @@ +- enum: + values: + - name: swMode + value: -1 + - name: ftMode + value: 1 + - name: ffMode + value: 0 + +# #### + +- typedef: + name: FreeWave + type: Byte[30001] + +# #### + +- struct: + name: FFSynthRec + members: + - name: mode + type: INTEGER + - name: fcount + type: Fixed + - name: waveBytes + type: FreeWave + size: 30008 + +# #### + +- typedef: + name: FFSynthPtr + type: FFSynthRec* + +# #### + +- struct: + name: Tone + members: + - name: tcount + type: INTEGER + - name: amplitude + type: INTEGER + - name: tduration + type: INTEGER + size: 6 + +# #### + +- typedef: + name: Tones + type: Tone[5001] + +# #### + +- struct: + name: SWSynthRec + members: + - name: mode + type: INTEGER + - name: triplets + type: Tones + size: 30008 + +# #### + +- typedef: + name: SWSynthPtr + type: SWSynthRec* + +# #### + +- typedef: + name: Wave + type: Byte[256] + +# #### + +- typedef: + name: WavePtr + type: Wave* + +# #### + +- struct: + name: FTSoundRec + members: + - name: fduration + type: INTEGER + - name: sound1Rate + type: Fixed + - name: sound1Phase + type: LONGINT + - name: sound2Rate + type: Fixed + - name: sound2Phase + type: LONGINT + - name: sound3Rate + type: Fixed + - name: sound3Phase + type: LONGINT + - name: sound4Rate + type: Fixed + - name: sound4Phase + type: LONGINT + - name: sound1Wave + type: WavePtr + - name: sound2Wave + type: WavePtr + - name: sound3Wave + type: WavePtr + - name: sound4Wave + type: WavePtr + size: 50 + +# #### + +- typedef: + name: FTSndRecPtr + type: FTSoundRec* + +# #### + +- struct: + name: FTSynthRec + members: + - name: mode + type: INTEGER + - name: sndRec + type: FTSndRecPtr + size: 6 + +# #### + +- typedef: + name: FTsynthPtr + type: FTSynthRec* + +# #### + +- lowmem: + name: SdVolume + type: Byte + address: 0x260 + comment: | + SoundDvr IMII-232 (true-b); + +# #### + +- lowmem: + name: SoundPtr + type: FTSndRecPtr + address: 0x262 + comment: | + SoundDvr IMII-227 (false); + +# #### + +- lowmem: + name: SoundBase + type: Ptr + address: 0x266 + comment: | + SoundDvr IMIII-21 (true-b); + +# #### + +- lowmem: + name: SoundLevel + type: Byte + address: 0x27F + comment: | + SoundDvr IMII-234 (false); + +# #### + +- lowmem: + name: CurPitch + type: INTEGER + address: 0x280 + comment: | + SoundDvr IMII-226 (true-b); + +# #### + +- function: + name: StartSound + args: + - name: srec + type: Ptr + - name: nb + type: LONGINT + - name: comp + type: ProcPtr + +# #### + +- function: + name: StopSound + +# #### + +- function: + name: SoundDone + return: Boolean + +# #### + +- function: + name: GetSoundVol + args: + - name: volp + type: INTEGER* + +# #### + +- function: + name: SetSoundVol + args: + - name: vol + type: INTEGER diff --git a/defs/SoundMgr.yaml b/defs/SoundMgr.yaml new file mode 100644 index 0000000..31c0904 --- /dev/null +++ b/defs/SoundMgr.yaml @@ -0,0 +1,1286 @@ +- struct: + name: SndCommand + members: + - name: cmd + type: INTEGER + - name: param1 + type: INTEGER + - name: param2 + type: LONGINT + size: 8 + +# #### + +- enum: + values: + - name: stdQLength + value: 128 + +# #### + +- enum: + values: + - name: stdSH + value: 0 + comment: | + standard sound header + - name: cmpSH + value: 0xFE + comment: | + compressed sound header + - name: extSH + value: 0xFF + comment: | + extended sound header + +# #### + +- struct: + name: SndChannel + +# #### + +- funptr: + args: + - type: SndChannel* + - type: SndCommand* + name: SndCallbackUPP + +# #### + +- struct: + name: SndChannel + members: + - name: nextChan + type: SndChannel* + - name: firstMod + type: Ptr + - name: callBack + type: SndCallbackUPP + - name: userInfo + type: LONGINT + - name: wait + type: LONGINT + - name: cmdInProg + type: SndCommand + - name: flags + type: INTEGER + - name: qLength + type: INTEGER + - name: qHead + type: INTEGER + - name: qTail + type: INTEGER + - name: queue + type: SndCommand[stdQLength] + size: 1060 + +# #### + +- typedef: + name: SndChannelPtr + type: SndChannel* + +# #### + +- enum: + values: + - name: nullCmd + - name: initCmd + - name: freeCmd + - name: quietCmd + - name: flushCmd + - name: waitCmd + value: 10 + - name: pauseCmd + - name: resumeCmd + - name: callBackCmd + - name: syncCmd + - name: emptyCmd + - name: tickleCmd + value: 20 + - name: requestNextCmd + - name: howOftenCmd + - name: wakeUpCmd + - name: availableCmd + - name: noteCmd + value: 40 + - name: restCmd + - name: freqCmd + - name: ampCmd + - name: timbreCmd + - name: waveTableCmd + value: 60 + - name: phaseCmd + - name: soundCmd + value: 80 + - name: bufferCmd + - name: rateCmd + - name: midiDataCmd + value: 100 + +# #### + +- struct: + name: soundbuffer_t + members: + - name: offset + type: LONGINT + - name: nsamples + type: LONGINT + - name: rate + type: LONGINT + - name: altbegin + type: LONGINT + - name: altend + type: LONGINT + - name: basenote + type: INTEGER + - name: buf + type: uint8_t[1] + size: 24 + +# #### + +- struct: + name: _SoundHeader + members: + - name: samplePtr + type: Ptr + - name: length + type: LONGINT + - name: sampleRate + type: Fixed + - name: loopStart + type: LONGINT + - name: loopEnd + type: LONGINT + - name: encode + type: Byte + - name: baseFrequency + type: Byte + - name: sampleArea + type: Byte[1] + +# #### + +- typedef: + name: SoundHeader + type: _SoundHeader + size: 24 + +# #### + +- typedef: + name: SoundHeaderPtr + type: _SoundHeader* + +# #### + +- struct: + name: _ExtSoundHeader + members: + - name: samplePtr + type: Ptr + - name: numChannels + type: LONGINT + - name: sampleRate + type: Fixed + - name: loopStart + type: LONGINT + - name: loopEnd + type: LONGINT + - name: encode + type: Byte + - name: baseFrequency + type: Byte + - name: numFrames + type: LONGINT + - name: AIFFSampleRate + type: extended80 + comment: | + ??? should be Extended80 + - name: MarkerChunk + type: Ptr + - name: instrumentChunks + type: Ptr + - name: AESRecording + type: Ptr + - name: sampleSize + type: INTEGER + - name: futureUse1 + type: INTEGER + - name: futureUse2 + type: LONGINT + - name: futureUse3 + type: LONGINT + - name: futureUse4 + type: LONGINT + - name: sampleArea + type: Byte[1] + +# #### + +- typedef: + name: ExtSoundHeader + type: _ExtSoundHeader + size: 66 + +# #### + +- typedef: + name: ExtSoundHeaderPtr + type: _ExtSoundHeader* + +# #### + +- enum: + values: + - name: noteSynth + value: 1 + - name: waveTableSynth + value: 3 + - name: sampledSynth + value: 5 + - name: MIDISynthIn + value: 7 + - name: MIDISynthOut + value: 9 + +# #### + +- enum: + values: + - name: badChannel + value: -205 + - name: badFormat + value: -206 + - name: noHardware + value: -200 + - name: notEnoughHardware + value: -201 + - name: queueFull + value: -203 + - name: resProblem + value: -204 + +# #### + +- lowmem: + name: SoundActive + type: Byte + address: 0x27E + comment: | + SoundDvr MPW (true); + +# #### + +- enum: + values: + - name: soundactiveoff + value: 0 + - name: soundactive5 + value: 5 + - name: soundactiveinplay + value: 0x81 + - name: soundactivenone + value: 0xFF + +# #### + +- struct: + name: SndDoubleBuffer + members: + - name: dbNumFrames + type: LONGINT + - name: dbFlags + type: LONGINT + - name: dbUserInfo + type: LONGINT[2] + - name: dbSoundData + type: Byte[1] + size: 18 + +# #### + +- typedef: + name: SndDoubleBufferPtr + type: SndDoubleBuffer* + +# #### + +- enum: + values: + - name: dbBufferReady + value: 1 + - name: dbLastBuffer + value: 4 + +# #### + +- funptr: + args: + - type: SndChannelPtr + - type: SndDoubleBufferPtr + name: SndDoubleBackUPP + +# #### + +- struct: + name: SndDoubleBufferHeader + members: + - name: dbhNumChannels + type: INTEGER + - name: dbhSampleSize + type: INTEGER + - name: dbhCompressionID + type: INTEGER + - name: dbhPacketSize + type: INTEGER + - name: dbhSampleRate + type: Fixed + - name: dbhBufferPtr + type: SndDoubleBufferPtr[2] + - name: dbhDoubleBack + type: SndDoubleBackUPP + size: 24 + +# #### + +- typedef: + name: SndDoubleBufferHeaderPtr + type: SndDoubleBufferHeader* + +# #### + +- struct: + name: _SCSTATUS + members: + - name: scStartTime + type: Fixed + - name: scEndTime + type: Fixed + - name: scCurrentTime + type: Fixed + - name: scChannelBusy + type: Boolean + - name: scChannelDisposed + type: Boolean + - name: scChannelPaused + type: Boolean + - name: scUnused + type: Boolean + - name: scChannelAttributes + type: LONGINT + - name: scCPULoad + type: LONGINT + +# #### + +- typedef: + name: SCStatus + type: _SCSTATUS + size: 24 + +# #### + +- typedef: + name: SCStatusPtr + type: _SCSTATUS* + +# #### + +- typedef: + name: SMStatusPtr + type: void* + +# #### + +- typedef: + name: NumVersion + type: LONGINT + +# #### + +- typedef: + name: AudioSelectionPtr + type: void* + +# #### + +- typedef: + name: SPBPtr + type: void* + +# #### + +- typedef: + name: UnsignedFixed + type: uint32_t + +# #### + +- typedef: + name: CompressionInfoPtr + type: Ptr + +# #### + +- dispatcher: + name: SoundDispatch + trap: 0xA800 + selector-location: D0<0xFFFFFF> + +# #### + +- function: + name: SndGetSysBeepState + args: + - name: statep + type: INTEGER* + dispatcher: SoundDispatch + selector: 0x02180008 + executor: C_ + +# #### + +- function: + name: SndSetSysBeepState + return: OSErr + args: + - name: state + type: INTEGER + dispatcher: SoundDispatch + selector: 0x011C0008 + executor: C_ + +# #### + +- function: + name: SndChannelStatus + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: length + type: INTEGER + - name: statusp + type: SCStatusPtr + dispatcher: SoundDispatch + selector: 0x05100008 + executor: C_ + +# #### + +- function: + name: SndManagerStatus + return: OSErr + args: + - name: length + type: INTEGER + - name: statusp + type: SMStatusPtr + dispatcher: SoundDispatch + selector: 0x03140008 + executor: C_ + +# #### + +- function: + name: SndSoundManagerVersion + return: NumVersion + dispatcher: SoundDispatch + selector: 0x000C0008 + executor: C_ + +# #### + +- function: + name: MACEVersion + return: NumVersion + dispatcher: SoundDispatch + selector: 0x00000010 + executor: C_ + +# #### + +- function: + name: SPBVersion + return: NumVersion + dispatcher: SoundDispatch + selector: 0x00000014 + executor: C_ + +# #### + +- function: + name: SndStartFilePlay + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: refnum + type: INTEGER + - name: resnum + type: INTEGER + - name: buffersize + type: LONGINT + - name: bufferp + type: Ptr + - name: theselectionp + type: AudioSelectionPtr + - name: completionp + type: ProcPtr + - name: async + type: Boolean + dispatcher: SoundDispatch + selector: 0x0D000008 + executor: C_ + +# #### + +- function: + name: SndPauseFilePlay + return: OSErr + args: + - name: chanp + type: SndChannelPtr + dispatcher: SoundDispatch + selector: 0x02040008 + executor: C_ + +# #### + +- function: + name: SndStopFilePlay + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: async + type: Boolean + dispatcher: SoundDispatch + selector: 0x03080008 + executor: C_ + +# #### + +- function: + name: SndPlayDoubleBuffer + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: paramp + type: SndDoubleBufferHeaderPtr + dispatcher: SoundDispatch + selector: 0x04200008 + executor: C_ + +# #### + +- function: + name: Comp3to1 + args: + - name: inp + type: Ptr + - name: outp + type: Ptr + - name: cnt + type: LONGINT + - name: instatep + type: Ptr + - name: outstatep + type: Ptr + - name: numchannels + type: LONGINT + - name: whichchannel + type: LONGINT + dispatcher: SoundDispatch + selector: 0x00040010 + executor: C_ + +# #### + +- function: + name: Comp6to1 + args: + - name: inp + type: Ptr + - name: outp + type: Ptr + - name: cnt + type: LONGINT + - name: instatep + type: Ptr + - name: outstatep + type: Ptr + - name: numchannels + type: LONGINT + - name: whichchannel + type: LONGINT + dispatcher: SoundDispatch + selector: 0x000C0010 + executor: C_ + +# #### + +- function: + name: Exp1to3 + args: + - name: inp + type: Ptr + - name: outp + type: Ptr + - name: cnt + type: LONGINT + - name: instatep + type: Ptr + - name: outstatep + type: Ptr + - name: numchannels + type: LONGINT + - name: whichchannel + type: LONGINT + dispatcher: SoundDispatch + selector: 0x00080010 + executor: C_ + +# #### + +- function: + name: Exp1to6 + args: + - name: inp + type: Ptr + - name: outp + type: Ptr + - name: cnt + type: LONGINT + - name: instatep + type: Ptr + - name: outstatep + type: Ptr + - name: numchannels + type: LONGINT + - name: whichchannel + type: LONGINT + dispatcher: SoundDispatch + selector: 0x00100010 + executor: C_ + +# #### + +- function: + name: SndRecord + return: OSErr + args: + - name: filterp + type: ProcPtr + - name: corner + type: Point + - name: quality + type: OSType + - name: sndhandlep + type: Handle* + dispatcher: SoundDispatch + selector: 0x08040014 + executor: C_ + +# #### + +- function: + name: SndRecordToFile + return: OSErr + args: + - name: filterp + type: ProcPtr + - name: corner + type: Point + - name: quality + type: OSType + - name: refnum + type: INTEGER + dispatcher: SoundDispatch + selector: 0x07080014 + executor: C_ + +# #### + +- function: + name: SPBOpenDevice + return: OSErr + args: + - name: name + type: ConstStringPtr + - name: permission + type: INTEGER + - name: inrefnump + type: LONGINT* + dispatcher: SoundDispatch + selector: 0x05180014 + executor: C_ + +# #### + +- function: + name: SPBCloseDevice + return: OSErr + args: + - name: inrefnum + type: LONGINT + dispatcher: SoundDispatch + selector: 0x021C0014 + executor: C_ + +# #### + +- function: + name: SPBRecord + return: OSErr + args: + - name: inparamp + type: SPBPtr + - name: async + type: Boolean + dispatcher: SoundDispatch + selector: 0x03200014 + executor: C_ + +# #### + +- function: + name: SPBRecordToFile + return: OSErr + args: + - name: refnum + type: INTEGER + - name: inparamp + type: SPBPtr + - name: async + type: Boolean + dispatcher: SoundDispatch + selector: 0x04240014 + executor: C_ + +# #### + +- function: + name: SPBPauseRecording + return: OSErr + args: + - name: refnum + type: LONGINT + dispatcher: SoundDispatch + selector: 0x02280014 + executor: C_ + +# #### + +- function: + name: SPBResumeRecording + return: OSErr + args: + - name: refnum + type: LONGINT + dispatcher: SoundDispatch + selector: 0x022C0014 + executor: C_ + +# #### + +- function: + name: SPBStopRecording + return: OSErr + args: + - name: refnum + type: LONGINT + dispatcher: SoundDispatch + selector: 0x02300014 + executor: C_ + +# #### + +- function: + name: SPBGetRecordingStatus + return: OSErr + args: + - name: refnum + type: LONGINT + - name: recordingstatus + type: INTEGER* + - name: meterlevel + type: INTEGER* + - name: totalsampstorecord + type: LONGINT* + - name: numsampsrecorded + type: LONGINT* + - name: totalmsecstorecord + type: LONGINT* + - name: numbermsecsrecorded + type: LONGINT* + dispatcher: SoundDispatch + selector: 0x0E340014 + executor: C_ + +# #### + +- function: + name: SPBGetDeviceInfo + return: OSErr + args: + - name: refnum + type: LONGINT + - name: info + type: OSType + - name: infop + type: Ptr + dispatcher: SoundDispatch + selector: 0x06380014 + executor: C_ + +# #### + +- function: + name: SPBSetDeviceInfo + return: OSErr + args: + - name: refnum + type: LONGINT + - name: info + type: OSType + - name: infop + type: Ptr + dispatcher: SoundDispatch + selector: 0x063C0014 + executor: C_ + +# #### + +- function: + name: SetupSndHeader + return: OSErr + args: + - name: sndhandle + type: Handle + - name: numchannels + type: INTEGER + - name: rate + type: Fixed + - name: size + type: INTEGER + - name: compresion + type: OSType + - name: basefreq + type: INTEGER + - name: numbytes + type: LONGINT + - name: headerlenp + type: INTEGER* + dispatcher: SoundDispatch + selector: 0x0D480014 + executor: C_ + +# #### + +- function: + name: SetupAIFFHeader + return: OSErr + args: + - name: refnum + type: INTEGER + - name: numchannels + type: INTEGER + - name: samplerate + type: Fixed + - name: samplesize + type: INTEGER + - name: compression + type: OSType + - name: numbytes + type: LONGINT + - name: numframes + type: LONGINT + dispatcher: SoundDispatch + selector: 0x0B4C0014 + executor: C_ + +# #### + +- function: + name: SPBSignInDevice + return: OSErr + args: + - name: refnum + type: INTEGER + - name: name + type: ConstStringPtr + dispatcher: SoundDispatch + selector: 0x030C0014 + executor: C_ + +# #### + +- function: + name: SPBSignOutDevice + return: OSErr + args: + - name: refnum + type: INTEGER + dispatcher: SoundDispatch + selector: 0x01100014 + executor: C_ + +# #### + +- function: + name: SPBGetIndexedDevice + return: OSErr + args: + - name: count + type: INTEGER + - name: name + type: ConstStringPtr + - name: deviceiconhandlep + type: Handle* + dispatcher: SoundDispatch + selector: 0x05140014 + executor: C_ + +# #### + +- function: + name: SPBMillisecondsToBytes + return: OSErr + args: + - name: refnum + type: LONGINT + - name: millip + type: LONGINT* + dispatcher: SoundDispatch + selector: 0x04400014 + executor: C_ + +# #### + +- function: + name: SPBBytesToMilliseconds + return: OSErr + args: + - name: refnum + type: LONGINT + - name: bytecountp + type: LONGINT* + dispatcher: SoundDispatch + selector: 0x04440014 + executor: C_ + +# #### + +- function: + name: GetSysBeepVolume + return: OSErr + args: + - name: levelp + type: LONGINT* + dispatcher: SoundDispatch + selector: 0x02240018 + executor: C_ + +# #### + +- function: + name: SetSysBeepVolume + return: OSErr + args: + - name: level + type: LONGINT + dispatcher: SoundDispatch + selector: 0x02280018 + executor: C_ + +# #### + +- function: + name: GetDefaultOutputVolume + return: OSErr + args: + - name: levelp + type: LONGINT* + dispatcher: SoundDispatch + selector: 0x022C0018 + executor: C_ + +# #### + +- function: + name: SetDefaultOutputVolume + return: OSErr + args: + - name: level + type: LONGINT + dispatcher: SoundDispatch + selector: 0x02300018 + executor: C_ + +# #### + +- function: + name: GetSoundHeaderOffset + return: OSErr + args: + - name: sndHandle + type: Handle + - name: offset + type: LONGINT* + dispatcher: SoundDispatch + selector: 0x04040018 + executor: C_ + +# #### + +- function: + name: UnsignedFixedMulDiv + return: UnsignedFixed + args: + - name: value + type: UnsignedFixed + - name: multiplier + type: UnsignedFixed + - name: divisor + type: UnsignedFixed + dispatcher: SoundDispatch + selector: 0x060C0018 + executor: C_ + +# #### + +- function: + name: GetCompressionInfo + return: OSErr + args: + - name: compressionID + type: INTEGER + - name: format + type: OSType + - name: numChannels + type: INTEGER + - name: sampleSize + type: INTEGER + - name: cp + type: CompressionInfoPtr + dispatcher: SoundDispatch + selector: 0x07100018 + executor: C_ + +# #### + +- function: + name: SetSoundPreference + return: OSErr + args: + - name: theType + type: OSType + - name: name + type: ConstStringPtr + - name: settings + type: Handle + dispatcher: SoundDispatch + selector: 0x06340018 + executor: C_ + +# #### + +- function: + name: GetSoundPreference + return: OSErr + args: + - name: theType + type: OSType + - name: name + type: ConstStringPtr + - name: settings + type: Handle + dispatcher: SoundDispatch + selector: 0x06380018 + executor: C_ + +# #### + +- function: + name: SndGetInfo + return: OSErr + args: + - name: chan + type: SndChannelPtr + - name: selector + type: OSType + - name: infoPtr + type: void* + dispatcher: SoundDispatch + selector: 0x063C0018 + executor: C_ + +# #### + +- function: + name: SndSetInfo + return: OSErr + args: + - name: chan + type: SndChannelPtr + - name: selector + type: OSType + - name: infoPtr + type: void* + dispatcher: SoundDispatch + selector: 0x06400018 + executor: C_ + +# #### + +- function: + name: SndPlay + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: sndh + type: Handle + - name: async + type: Boolean + trap: 0xA805 + executor: C_ + +# #### + +- function: + name: SndNewChannel + return: OSErr + args: + - name: chanpp + type: SndChannelPtr* + - name: synth + type: INTEGER + - name: init + type: LONGINT + - name: userroutinep + type: SndCallbackUPP + trap: 0xA807 + executor: C_ + +# #### + +- function: + name: SndAddModifier + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: mod + type: ProcPtr + - name: id + type: INTEGER + - name: init + type: LONGINT + trap: 0xA802 + executor: C_ + +# #### + +- function: + name: SndDoCommand + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: cmdp + type: SndCommand* + - name: nowait + type: Boolean + trap: 0xA803 + executor: C_ + +# #### + +- function: + name: SndDoImmediate + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: cmdp + type: SndCommand* + trap: 0xA804 + executor: C_ + +# #### + +- function: + name: SndControl + return: OSErr + args: + - name: id + type: INTEGER + - name: cmdp + type: SndCommand* + trap: 0xA806 + executor: C_ + +# #### + +- function: + name: SndDisposeChannel + return: OSErr + args: + - name: chanp + type: SndChannelPtr + - name: quitnow + type: Boolean + trap: 0xA801 + executor: C_ + +# #### + +- function: + name: FinaleUnknown1 + dispatcher: SoundDispatch + selector: 0x00000000 + executor: C_ + +# #### + +- function: + name: FinaleUnknown2 + return: OSErr + args: + - type: ResType + - type: LONGINT + - type: Ptr + - type: Ptr + dispatcher: SoundDispatch + selector: 0x00040004 + executor: C_ + +# #### + +- function: + name: DirectorUnknown3 + return: LONGINT + dispatcher: SoundDispatch + selector: 0x00000004 + executor: C_ + +# #### + +- function: + name: DirectorUnknown4 + return: INTEGER + args: + - type: ResType + - type: INTEGER + - type: Ptr + - type: Ptr + dispatcher: SoundDispatch + selector: 0x001C0004 + executor: C_ diff --git a/defs/SpeechManager.yaml b/defs/SpeechManager.yaml new file mode 100644 index 0000000..d2a1b9c --- /dev/null +++ b/defs/SpeechManager.yaml @@ -0,0 +1,472 @@ +- struct: + name: VoiceSpec + members: + - name: creator + type: OSType + - name: id + type: OSType + +# #### + +- typedef: + name: VoiceSpecPtr + type: VoiceSpec* + +# #### + +- struct: + name: VoiceFileInfo + members: + - name: fileSpec + type: FSSpec + - name: resID + type: uint16_t + +# #### + +- struct: + name: SpeechStatusInfo + members: + - name: outputBusy + type: Boolean + - name: outputPaused + type: Boolean + - name: inputBytesLeft + type: int32_t + - name: phonemeCode + type: int16_t + +# #### + +- struct: + name: VoiceDescription + members: + - name: length + type: int32_t + - name: voice + type: VoiceSpec + - name: version + type: int32_t + - name: name + type: Str63 + - name: comment + type: Str255 + - name: gender + type: int16_t + - name: age + type: int16_t + - name: script + type: int16_t + - name: language + type: int16_t + - name: region + type: int16_t + - name: reserved + type: int32_t[4] + +# #### + +- struct: + name: SpeechChannelRecord + members: + - name: data + type: LONGINT[1] + +# #### + +- typedef: + name: SpeechChannel + type: SpeechChannelRecord* + +# #### + +- struct: + name: PhonemeInfo + members: + - name: opcode + type: int16_t + - name: phStr + type: Str15 + - name: exampleStr + type: Str31 + - name: hiliteStart + type: int16_t + - name: hiliteEnd + type: int16_t + +# #### + +- struct: + name: PhonemeDescriptor + members: + - name: phonemeCount + type: int16_t + - name: thePhonemes + type: PhonemeInfo[1] + +# #### + +- struct: + name: SpeechXtndData + members: + - name: synthCreator + type: OSType + - name: synthData + type: Byte[2] + +# #### + +- struct: + name: DelimiterInfo + members: + - name: startDelimiter + type: Byte[2] + - name: endDelimiter + type: Byte[2] + +# #### + +- function: + name: SpeechManagerVersion + return: NumVersion + dispatcher: SoundDispatch + selector: 0x0000000C + executor: C_ + +# #### + +- function: + name: SpeechBusy + return: int16_t + dispatcher: SoundDispatch + selector: 0x003C000C + executor: C_ + +# #### + +- function: + name: SpeechBusySystemWide + return: int16_t + dispatcher: SoundDispatch + selector: 0x0040000C + executor: C_ + +# #### + +- function: + name: CountVoices + return: OSErr + args: + - name: numVoices + type: int16_t* + dispatcher: SoundDispatch + selector: 0x0108000C + executor: C_ + +# #### + +- function: + name: DisposeSpeechChannel + return: OSErr + args: + - name: chan + type: SpeechChannel + dispatcher: SoundDispatch + selector: 0x021C000C + executor: C_ + +# #### + +- function: + name: SpeakString + return: OSErr + args: + - name: textToBeSpoken + type: ConstStringPtr + dispatcher: SoundDispatch + selector: 0x0220000C + executor: C_ + +# #### + +- function: + name: StopSpeech + return: OSErr + args: + - name: chan + type: SpeechChannel + dispatcher: SoundDispatch + selector: 0x022C000C + executor: C_ + +# #### + +- function: + name: ContinueSpeech + return: OSErr + args: + - name: chan + type: SpeechChannel + dispatcher: SoundDispatch + selector: 0x0238000C + executor: C_ + +# #### + +- function: + name: GetIndVoice + return: OSErr + args: + - name: index + type: int16_t + - name: voice + type: VoiceSpec* + dispatcher: SoundDispatch + selector: 0x030C000C + executor: C_ + +# #### + +- function: + name: NewSpeechChannel + return: OSErr + args: + - name: voice + type: VoiceSpec* + - name: chan + type: SpeechChannel* + dispatcher: SoundDispatch + selector: 0x0418000C + executor: C_ + +# #### + +- function: + name: StopSpeechAt + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: whereToStop + type: int32_t + dispatcher: SoundDispatch + selector: 0x0430000C + executor: C_ + +# #### + +- function: + name: PauseSpeechAt + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: whereToPause + type: int32_t + dispatcher: SoundDispatch + selector: 0x0434000C + executor: C_ + +# #### + +- function: + name: SetSpeechRate + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: rate + type: Fixed + dispatcher: SoundDispatch + selector: 0x0444000C + executor: C_ + +# #### + +- function: + name: GetSpeechRate + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: rate + type: Fixed* + dispatcher: SoundDispatch + selector: 0x0448000C + executor: C_ + +# #### + +- function: + name: SetSpeechPitch + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: pitch + type: Fixed + dispatcher: SoundDispatch + selector: 0x044C000C + executor: C_ + +# #### + +- function: + name: GetSpeechPitch + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: pitch + type: Fixed* + dispatcher: SoundDispatch + selector: 0x0450000C + executor: C_ + +# #### + +- function: + name: UseDictionary + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: dictionary + type: Handle + dispatcher: SoundDispatch + selector: 0x0460000C + executor: C_ + +# #### + +- function: + name: MakeVoiceSpec + return: OSErr + args: + - name: creator + type: OSType + - name: id + type: OSType + - name: voice + type: VoiceSpec* + dispatcher: SoundDispatch + selector: 0x0604000C + executor: C_ + +# #### + +- function: + name: GetVoiceDescription + return: OSErr + args: + - name: voice + type: const VoiceSpec* + - name: info + type: VoiceDescription* + - name: infoLength + type: LONGINT + dispatcher: SoundDispatch + selector: 0x0610000C + executor: C_ + +# #### + +- function: + name: GetVoiceInfo + return: OSErr + args: + - name: voice + type: const VoiceSpec* + - name: selector + type: OSType + - name: voiceInfo + type: void* + dispatcher: SoundDispatch + selector: 0x0614000C + executor: C_ + +# #### + +- function: + name: SpeakText + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: textBuf + type: const void* + - name: textBytes + type: ULONGINT + dispatcher: SoundDispatch + selector: 0x0624000C + executor: C_ + +# #### + +- function: + name: SetSpeechInfo + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: selector + type: OSType + - name: speechInfo + type: const void* + dispatcher: SoundDispatch + selector: 0x0654000C + executor: C_ + +# #### + +- function: + name: GetSpeechInfo + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: selector + type: OSType + - name: speechInfo + type: void* + dispatcher: SoundDispatch + selector: 0x0658000C + executor: C_ + +# #### + +- function: + name: SpeakBuffer + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: textBuf + type: const void* + - name: textBytes + type: ULONGINT + - name: controlFlags + type: int32_t + dispatcher: SoundDispatch + selector: 0x0828000C + executor: C_ + +# #### + +- function: + name: TextToPhonemes + return: OSErr + args: + - name: chan + type: SpeechChannel + - name: textBuf + type: const void* + - name: textBytes + type: ULONGINT + - name: phonemeBuf + type: Handle + - name: phonemeBytes + type: LONGINT* + dispatcher: SoundDispatch + selector: 0x0A5C000C + executor: C_ diff --git a/defs/StartMgr.yaml b/defs/StartMgr.yaml new file mode 100644 index 0000000..d31e9b6 --- /dev/null +++ b/defs/StartMgr.yaml @@ -0,0 +1,98 @@ +- union: + members: + - name: slotDev + struct: + - name: sdExtDevID + type: SignedByte + - name: sdPartition + type: SignedByte + - name: sdSlotNum + type: SignedByte + - name: sdSRsrcID + type: SignedByte + - name: scsiDev + struct: + - name: sdReserved1 + type: SignedByte + - name: sdReserved2 + type: SignedByte + - name: sdRefNum + type: INTEGER + name: DefStartRec + size: 4 + +# #### + +- typedef: + name: DefStartPtr + type: DefStartRec* + +# #### + +- struct: + members: + - name: sdSlot + type: SignedByte + - name: sdSResource + type: SignedByte + name: DefVideoRec + size: 2 + +# #### + +- typedef: + name: DefVideoPtr + type: DefVideoRec* + +# #### + +- struct: + members: + - name: sdReserved + type: SignedByte + - name: sdOSType + type: SignedByte + name: DefOSRec + size: 2 + +# #### + +- typedef: + name: DefOSPtr + type: DefOSRec* + +# #### + +- lowmem: + name: CPUFlag + type: Byte + address: 0x12F + comment: | + StartMgr IMV-348 (true-b); + +# #### + +- lowmem: + name: TimeDBRA + type: INTEGER + address: 0xD00 + comment: | + StartMgr IMV (false); + +# #### + +- lowmem: + name: TimeSCCDB + type: INTEGER + address: 0xD02 + comment: | + StartMgr IMV (false); + +# #### + +- lowmem: + name: TimeSCSIDB + type: INTEGER + address: 0xDA6 + comment: | + StartMgr IMV (false); diff --git a/defs/StdFilePkg.yaml b/defs/StdFilePkg.yaml new file mode 100644 index 0000000..6b2b554 --- /dev/null +++ b/defs/StdFilePkg.yaml @@ -0,0 +1,440 @@ +- enum: + values: + - name: putDlgID + value: -3999 + +# #### + +- enum: + values: + - name: putSave + value: 1 + - name: putCancel + value: 2 + - name: putEject + value: 5 + - name: putDrive + value: 6 + - name: putName + value: 7 + +# #### + +- enum: + values: + - name: getDlgID + value: -4000 + +# #### + +- enum: + values: + - name: getOpen + value: 1 + - name: getCancel + value: 3 + - name: getEject + value: 5 + - name: getDrive + value: 6 + - name: getNmList + value: 7 + - name: getScroll + value: 8 + +# #### + +- struct: + name: SFReply + members: + - name: good + type: Boolean + - name: copy + type: Boolean + - name: fType + type: OSType + - name: vRefNum + type: INTEGER + - name: version + type: INTEGER + - name: fName + type: Str63 + size: 74 + +# #### + +- typedef: + name: SFTypeList + type: OSType[4] + +# #### + +- lowmem: + name: SFSaveDisk + type: INTEGER + address: 0x214 + comment: | + StdFilePkg IMIV-72 (true); + +# #### + +- lowmem: + name: CurDirStore + type: LONGINT + address: 0x398 + comment: | + StdFilePkg IMIV-72 (true); + +# #### + +- struct: + name: StandardFileReply + members: + - name: sfGood + type: Boolean + - name: sfReplacing + type: Boolean + - name: sfType + type: OSType + - name: sfFile + type: FSSpec + - name: sfScript + type: ScriptCode + - name: sfFlags + type: INTEGER + - name: sfIsFolder + type: Boolean + - name: sfIsVolume + type: Boolean + - name: sfReserved1 + type: LONGINT + - name: sfReserved2 + type: INTEGER + size: 88 + +# #### + +- funptr: + return: INTEGER + args: + - name: item + type: INTEGER + - name: theDialog + type: DialogPtr + name: DlgHookUPP + +# #### + +- funptr: + return: Boolean + args: + - name: pb + type: CInfoPBPtr + name: FileFilterUPP + +# #### + +- funptr: + return: INTEGER + args: + - name: item + type: INTEGER + - name: theDialog + type: DialogPtr + - name: yourDataPtr + type: void* + name: DlgHookYDUPP + +# #### + +- funptr: + return: Boolean + args: + - name: pb + type: CInfoPBPtr + - name: yourDataPtr + type: void* + name: FileFilterYDUPP + +# #### + +- funptr: + args: + - name: theDialog + type: DialogPtr + - name: itemNo + type: INTEGER + - name: activating + type: Boolean + - name: yourDataPtr + type: void* + name: ActivateYDUPP + +# #### + +- enum: + values: + - name: sfItemOpenButton + value: 1 + - name: sfItemCancelButton + value: 2 + - name: sfItemBalloonHelp + value: 3 + - name: sfItemVolumeUser + value: 4 + - name: sfItemEjectButton + value: 5 + - name: sfItemDesktopButton + value: 6 + - name: sfItemFileListUser + value: 7 + - name: sfItemPopUpMenuUser + value: 8 + - name: sfItemDividerLinePict + value: 9 + - name: sfItemFileNameTextEdit + value: 10 + comment: | + Put only + - name: sfItemPromptStaticText + value: 11 + - name: sfItemNewFolderUser + value: 12 + +# #### + +- enum: + values: + - name: sfHookFirstCall + value: -1 + - name: sfHookLastCall + value: -2 + - name: sfHookNullEvent + value: 100 + - name: sfHookRebuildList + value: 101 + - name: sfHookFolderPopUp + value: 102 + - name: sfHookOpenFolder + value: 103 + - name: sfHookOpenAlias + value: 104 + - name: sfHookGoToDesktop + value: 105 + - name: sfHookGoToAliasTarget + value: 106 + - name: sfHookGoToParent + value: 107 + - name: sfHookGoToNextDrive + value: 108 + - name: sfHookGoToPrevDrive + value: 109 + - name: sfHookChangeSelection + value: 110 + +# #### + +- enum: + values: + - name: sfMainDialogRefCon + value: "'stdf'" + +# #### + +- enum: + values: + - name: sfPutDialogID + value: -6043 + - name: sfGetDialogID + value: -6042 + +# #### + +- dispatcher: + name: Pack3 + trap: 0xA9EA + selector-location: StackW + +# #### + +- function: + name: SFPPutFile + args: + - name: p + type: Point + - name: prompt + type: ConstStringPtr + - name: name + type: ConstStringPtr + - name: dh + type: DlgHookUPP + - name: rep + type: SFReply* + - name: dig + type: INTEGER + - name: fp + type: ModalFilterUPP + dispatcher: Pack3 + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: SFPutFile + args: + - name: p + type: Point + - name: prompt + type: ConstStringPtr + - name: name + type: ConstStringPtr + - name: dh + type: DlgHookUPP + - name: rep + type: SFReply* + dispatcher: Pack3 + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: SFPGetFile + args: + - name: p + type: Point + - name: prompt + type: ConstStringPtr + - name: filef + type: FileFilterUPP + - name: numt + type: INTEGER + - name: tl + type: SFTypeList + - name: dh + type: DlgHookUPP + - name: rep + type: SFReply* + - name: dig + type: INTEGER + - name: fp + type: ModalFilterUPP + dispatcher: Pack3 + selector: 0x0004 + executor: C_ + +# #### + +- function: + name: SFGetFile + args: + - name: p + type: Point + - name: prompt + type: ConstStringPtr + - name: filef + type: FileFilterUPP + - name: numt + type: INTEGER + - name: tl + type: SFTypeList + - name: dh + type: DlgHookUPP + - name: rep + type: SFReply* + dispatcher: Pack3 + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: StandardGetFile + args: + - name: filef + type: FileFilterUPP + - name: numt + type: INTEGER + - name: tl + type: SFTypeList + - name: replyp + type: StandardFileReply* + dispatcher: Pack3 + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: StandardPutFile + args: + - name: prompt + type: ConstStringPtr + - name: defaultname + type: ConstStringPtr + - name: replyp + type: StandardFileReply* + dispatcher: Pack3 + selector: 0x0005 + executor: C_ + +# #### + +- function: + name: CustomPutFile + args: + - name: prompt + type: ConstStringPtr + - name: defaultName + type: ConstStringPtr + - name: replyp + type: StandardFileReply* + - name: dlgid + type: INTEGER + - name: where + type: Point + - name: dlghook + type: DlgHookYDUPP + - name: filterproc + type: ModalFilterYDUPP + - name: activeList + type: Ptr + - name: activateproc + type: ActivateYDUPP + - name: yourdatap + type: void* + dispatcher: Pack3 + selector: 0x0007 + executor: C_ + +# #### + +- function: + name: CustomGetFile + args: + - name: filefilter + type: FileFilterYDUPP + - name: numtypes + type: INTEGER + - name: typelist + type: SFTypeList + - name: replyp + type: StandardFileReply* + - name: dlgid + type: INTEGER + - name: where + type: Point + - name: dlghook + type: DlgHookYDUPP + - name: filterproc + type: ModalFilterYDUPP + - name: activeList + type: Ptr + - name: activateproc + type: ActivateYDUPP + - name: yourdatap + type: void* + dispatcher: Pack3 + selector: 0x0008 + executor: C_ diff --git a/defs/SysErr.yaml b/defs/SysErr.yaml new file mode 100644 index 0000000..6ff4a58 --- /dev/null +++ b/defs/SysErr.yaml @@ -0,0 +1,59 @@ +- enum: + values: + - name: EXIST_YES + value: 0 + - name: EXIST_NO + value: 0xFF + name: exist_enum_t + +# #### + +- lowmem: + name: DSAlertTab + type: Ptr + address: 0x2BA + comment: | + SysErr IMII-359 (true); + +# #### + +- lowmem: + name: DSAlertRect + type: Rect + address: 0x3F8 + comment: | + SysErr IMII-362 (true); + +# #### + +- lowmem: + name: WWExist + type: Byte + address: 0x8F2 + comment: | + SysError SysEqu.a (true); + +# #### + +- lowmem: + name: QDExist + type: Byte + address: 0x8F3 + comment: | + SysError SysEqu.a (true); + +# #### + +- executor_only: + code: | + extern char syserr_msg[]; + +# #### + +- function: + name: SysError + args: + - name: errorcode + type: int16_t + trap: 0xA9C9 + executor: C_ diff --git a/defs/TextEdit.yaml b/defs/TextEdit.yaml new file mode 100644 index 0000000..a75d764 --- /dev/null +++ b/defs/TextEdit.yaml @@ -0,0 +1,1036 @@ +- enum: + values: + - name: teFlushDefault + value: 0 + - name: teCenter + value: 1 + - name: teFlushRight + value: -1 + - name: teFlushLeft + value: -2 + comment: | + new justification defines, accepted by `TESetAlignment ()' and + `TETextBox ()' + +# #### + +- enum: + values: + - name: teJustLeft + value: 0 + - name: teJustCenter + value: 1 + - name: teJustRight + value: -1 + - name: teForceLeft + value: -2 + comment: | + older justification defines + +# #### + +- enum: + values: + - name: doFont + value: 1 + - name: doFace + value: 2 + - name: doSize + value: 4 + - name: doColor + value: 8 + - name: doAll + value: 15 + - name: addSize + value: 16 + - name: doToggle + value: 32 + +# #### + +- enum: + values: + - name: teFind + value: 0 + - name: teHilite + value: 1 + - name: teDraw + value: -1 + - name: teCaret + value: -2 + +# #### + +- enum: + values: + - name: caret_vis + value: -1 + - name: caret_invis + value: 255 + - name: hilite_vis + value: 0 + +# #### + +- enum: + values: + - name: teFAutoScroll + value: 0 + - name: teFTextBuffering + value: 1 + - name: teFOutlineHilite + value: 2 + - name: teFInlineInput + value: 3 + - name: teFUseTextServices + value: 4 + +# #### + +- enum: + values: + - name: teBitClear + value: 0 + - name: teBitSet + value: 1 + - name: teBitTest + value: -1 + +# #### + +- struct: + name: TERec + members: + - name: destRect + type: Rect + - name: viewRect + type: Rect + - name: selRect + type: Rect + - name: lineHeight + type: INTEGER + - name: fontAscent + type: INTEGER + - name: selPoint + type: Point + - name: selStart + type: INTEGER + - name: selEnd + type: INTEGER + - name: active + type: INTEGER + - name: wordBreak + type: ProcPtr + - name: clikLoop + type: ProcPtr + - name: clickTime + type: LONGINT + - name: clickLoc + type: INTEGER + - name: caretTime + type: LONGINT + - name: caretState + type: INTEGER + - name: just + type: INTEGER + - name: teLength + type: INTEGER + - name: hText + type: Handle + - name: recalBack + type: INTEGER + - name: recalLines + type: INTEGER + - name: clikStuff + type: INTEGER + - name: crOnly + type: INTEGER + - name: txFont + type: INTEGER + - name: txFace + type: Style + - name: filler + type: Byte + - name: txMode + type: INTEGER + - name: txSize + type: INTEGER + - name: inPort + type: GrafPtr + - name: highHook + type: ProcPtr + - name: caretHook + type: ProcPtr + - name: nLines + type: INTEGER + - name: lineStarts + type: INTEGER[1] + size: 98 + +# #### + +- typedef: + name: TEPtr + type: TERec* + +# #### + +- typedef: + name: TEHandle + type: TEPtr* + +# #### + +- struct: + name: StyleRun + members: + - name: startChar + type: INTEGER + - name: styleIndex + type: INTEGER + size: 4 + +# #### + +- struct: + name: STElement + members: + - name: stCount + type: INTEGER + - name: stHeight + type: INTEGER + - name: stAscent + type: INTEGER + - name: stFont + type: INTEGER + - name: stFace + type: Style + - name: filler + type: Byte + - name: stSize + type: INTEGER + - name: stColor + type: RGBColor + size: 18 + +# #### + +- typedef: + name: TEStyleTable + type: STElement[1] + +# #### + +- typedef: + name: STPtr + type: STElement* + +# #### + +- typedef: + name: STHandle + type: STPtr* + +# #### + +- struct: + name: LHElement + members: + - name: lhHeight + type: INTEGER + - name: lhAscent + type: INTEGER + size: 4 + +# #### + +- typedef: + name: LHTable + type: LHElement[1] + +# #### + +- typedef: + name: LHPtr + type: LHElement* + +# #### + +- typedef: + name: LHHandle + type: LHPtr* + +# #### + +- struct: + name: TextStyle + members: + - name: tsFont + type: INTEGER + - name: tsFace + type: Style + - name: filler + type: Byte + - name: tsSize + type: INTEGER + - name: tsColor + type: RGBColor + size: 12 + +# #### + +- struct: + name: ScrpSTElement + members: + - name: scrpStartChar + type: LONGINT + - name: scrpHeight + type: INTEGER + - name: scrpAscent + type: INTEGER + - name: scrpFont + type: INTEGER + - name: scrpFace + type: Style + - name: filler + type: Byte + - name: scrpSize + type: INTEGER + - name: scrpColor + type: RGBColor + size: 20 + +# #### + +- typedef: + name: ScrpSTTable + type: ScrpSTElement[1] + +# #### + +- struct: + name: StScrpRec + members: + - name: scrpNStyles + type: INTEGER + - name: scrpStyleTab + type: ScrpSTTable + size: 22 + +# #### + +- typedef: + name: StScrpPtr + type: StScrpRec* + +# #### + +- typedef: + name: StScrpHandle + type: StScrpPtr* + +# #### + +- struct: + name: NullSTRec + members: + - name: TEReserved + type: LONGINT + - name: nullScrap + type: StScrpHandle + size: 8 + +# #### + +- typedef: + name: NullSTPtr + type: NullSTRec* + +# #### + +- typedef: + name: NullSTHandle + type: NullSTPtr* + +# #### + +- struct: + name: TEStyleRec + members: + - name: nRuns + type: INTEGER + - name: nStyles + type: INTEGER + - name: styleTab + type: STHandle + - name: lhTab + type: LHHandle + - name: teRefCon + type: LONGINT + - name: nullStyle + type: NullSTHandle + - name: runs + type: StyleRun[1] + size: 24 + +# #### + +- typedef: + name: TEStylePtr + type: TEStyleRec* + +# #### + +- typedef: + name: TEStyleHandle + type: TEStylePtr* + +# #### + +- typedef: + name: Chars + type: Byte[1] + +# #### + +- typedef: + name: CharsPtr + type: Byte* + +# #### + +- typedef: + name: CharsHandle + type: Byte** + +# #### + +- lowmem: + name: TEDoText + type: ProcPtr + address: 0xA70 + comment: | + TextEdit IMI-391 (true); + +# #### + +- lowmem: + name: TERecal + type: ProcPtr + address: 0xA74 + comment: | + TextEdit IMI-391 (false); + +# #### + +- lowmem: + name: TEScrpLength + type: INTEGER + address: 0xAB0 + comment: | + TextEdit IMI-389 (true); + +# #### + +- lowmem: + name: TEScrpHandle + type: Handle + address: 0xAB4 + comment: | + TextEdit IMI-389 (true); + +# #### + +- dispatcher: + name: TEDispatch + trap: 0xA83D + selector-location: StackW + +# #### + +- function: + name: TESetText + args: + - name: p + type: Ptr + - name: ln + type: LONGINT + - name: teh + type: TEHandle + trap: 0xA9CF + executor: C_ + +# #### + +- function: + name: TEGetText + return: CharsHandle + args: + - name: teh + type: TEHandle + trap: 0xA9CB + executor: C_ + +# #### + +- function: + name: TESetAlignment + args: + - name: j + type: INTEGER + - name: teh + type: TEHandle + trap: 0xA9DF + executor: C_ + +# #### + +- function: + name: TEUpdate + args: + - name: r + type: const Rect* + - name: teh + type: TEHandle + trap: 0xA9D3 + executor: C_ + +# #### + +- function: + name: TETextBox + args: + - name: p + type: Ptr + - name: ln + type: LONGINT + - name: r + type: const Rect* + - name: j + type: INTEGER + trap: 0xA9CE + executor: C_ + +# #### + +- function: + name: TEScroll + args: + - name: dh + type: INTEGER + - name: dv + type: INTEGER + - name: teh + type: TEHandle + trap: 0xA9DD + executor: C_ + +# #### + +- function: + name: TEKey + args: + - name: thec + type: CharParameter + - name: teh + type: TEHandle + trap: 0xA9DC + executor: C_ + +# #### + +- function: + name: TECopy + args: + - name: teh + type: TEHandle + trap: 0xA9D5 + executor: C_ + +# #### + +- function: + name: TECut + args: + - name: teh + type: TEHandle + trap: 0xA9D6 + executor: C_ + +# #### + +- function: + name: TEPaste + args: + - name: teh + type: TEHandle + trap: 0xA9DB + executor: C_ + +# #### + +- function: + name: TEDelete + args: + - name: teh + type: TEHandle + trap: 0xA9D7 + executor: C_ + +# #### + +- function: + name: TEInsert + args: + - name: p + type: Ptr + - name: ln + type: LONGINT + - name: teh + type: TEHandle + trap: 0xA9DE + executor: C_ + +# #### + +- function: + name: TEPinScroll + args: + - name: dh + type: INTEGER + - name: dv + type: INTEGER + - name: teh + type: TEHandle + trap: 0xA812 + executor: C_ + +# #### + +- function: + name: TESelView + args: + - name: teh + type: TEHandle + trap: 0xA811 + executor: C_ + +# #### + +- function: + name: TEAutoView + args: + - name: autoflag + type: Boolean + - name: teh + type: TEHandle + trap: 0xA813 + executor: C_ + +# #### + +- function: + name: TEStyleNew + return: TEHandle + args: + - name: dst + type: const Rect* + - name: view + type: const Rect* + trap: 0xA83E + executor: C_ + +# #### + +- function: + name: TESetStyleHandle + args: + - name: theHandle + type: TEStyleHandle + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0005 + executor: C_ + +# #### + +- function: + name: TEGetStyleHandle + return: TEStyleHandle + args: + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0004 + executor: C_ + +# #### + +- function: + name: TEGetStyleScrapHandle + return: StScrpHandle + args: + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0006 + executor: C_ + +# #### + +- function: + name: TEStyleInsert + args: + - name: text + type: Ptr + - name: length + type: LONGINT + - name: hST + type: StScrpHandle + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0007 + executor: C_ + +# #### + +- function: + name: TEGetOffset + return: INTEGER + args: + - name: pt + type: Point + - name: teh + type: TEHandle + trap: 0xA83C + executor: C_ + +# #### + +- function: + name: TEGetPoint + return: LONGINT + args: + - name: offset + type: INTEGER + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0008 + executor: C_ + +# #### + +- function: + name: TEGetHeight + return: int32_t + args: + - name: endLine + type: LONGINT + - name: startLine + type: LONGINT + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0009 + executor: C_ + +# #### + +- function: + name: TEGetStyle + args: + - name: offset + type: INTEGER + - name: theStyle + type: TextStyle* + - name: lineHeight + type: INTEGER* + - name: fontAscent + type: INTEGER* + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0003 + executor: C_ + +# #### + +- function: + name: TEStylePaste + args: + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0000 + executor: C_ + +# #### + +- function: + name: TESetStyle + args: + - name: mode + type: INTEGER + - name: newStyle + type: TextStyle* + - name: redraw + type: Boolean + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0001 + executor: C_ + +# #### + +- function: + name: TEReplaceStyle + args: + - name: mode + type: INTEGER + - name: oldStyle + type: TextStyle* + - name: newStyle + type: TextStyle* + - name: redraw + type: Boolean + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x0002 + executor: C_ + +# #### + +- function: + name: TEContinuousStyle + return: Boolean + args: + - name: modep + type: INTEGER* + - name: thestyle + type: TextStyle* + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x000A + executor: C_ + +# #### + +- function: + name: TEUseStyleScrap + args: + - name: start + type: LONGINT + - name: stop + type: LONGINT + - name: newstyles + type: StScrpHandle + - name: redraw + type: Boolean + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x000B + executor: C_ + +# #### + +- function: + name: TECustomHook + args: + - name: sel + type: INTEGER + - name: addr + type: ProcPtr* + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x000C + executor: C_ + +# #### + +- function: + name: TENumStyles + return: LONGINT + args: + - name: start + type: LONGINT + - name: stop + type: LONGINT + - name: teh + type: TEHandle + dispatcher: TEDispatch + selector: 0x000D + executor: C_ + +# #### + +- function: + name: TEInit + trap: 0xA9CC + executor: C_ + +# #### + +- function: + name: TENew + return: TEHandle + args: + - name: dst + type: const Rect* + - name: view + type: const Rect* + trap: 0xA9D2 + executor: C_ + +# #### + +- function: + name: TEDispose + args: + - name: teh + type: TEHandle + trap: 0xA9CD + executor: C_ + +# #### + +- function: + name: TEIdle + args: + - name: teh + type: TEHandle + trap: 0xA9DA + executor: C_ + +# #### + +- function: + name: TEClick + args: + - name: p + type: Point + - name: ext + type: Boolean + - name: teh + type: TEHandle + trap: 0xA9D4 + executor: C_ + +# #### + +- function: + name: TESetSelect + args: + - name: start + type: LONGINT + - name: stop + type: LONGINT + - name: teh + type: TEHandle + trap: 0xA9D1 + executor: C_ + +# #### + +- function: + name: TEActivate + args: + - name: teh + type: TEHandle + trap: 0xA9D8 + executor: C_ + +# #### + +- function: + name: TEDeactivate + args: + - name: teh + type: TEHandle + trap: 0xA9D9 + executor: C_ + +# #### + +- function: + name: TESetWordBreak + args: + - name: wb + type: ProcPtr + - name: teh + type: TEHandle + +# #### + +- function: + name: TESetClickLoop + args: + - name: cp + type: ProcPtr + - name: teh + type: TEHandle + +# #### + +- function: + name: TECalText + args: + - name: teh + type: TEHandle + trap: 0xA9D0 + executor: C_ + +# #### + +- function: + name: TEFromScrap + return: OSErr + +# #### + +- function: + name: TEToScrap + return: OSErr + +# #### + +- function: + name: TEScrapHandle + return: Handle + +# #### + +- function: + name: TEGetScrapLength + return: LONGINT + +# #### + +- function: + name: TESetScrapLength + args: + - name: ln + type: LONGINT + +# #### + +- function: + name: TEFeatureFlag + return: int16_t + args: + - name: feature + type: int16_t + - name: action + type: int16_t + - name: te + type: TEHandle + dispatcher: TEDispatch + selector: 0x000E + executor: C_ diff --git a/defs/TimeMgr.yaml b/defs/TimeMgr.yaml new file mode 100644 index 0000000..21ecc5c --- /dev/null +++ b/defs/TimeMgr.yaml @@ -0,0 +1,53 @@ +- struct: + name: TMTask + members: + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: tmAddr + type: ProcPtr + - name: tmCount + type: LONGINT + comment: | + I don't trust IMIV-301 + size: 14 + +# #### + +- function: + name: InsTime + args: + - name: taskp + type: QElemPtr + register: A0 + executor: true + trap: 0xA058 + executor_extras: ClearD0 + +# #### + +- function: + name: RmvTime + args: + - name: taskp + type: QElemPtr + register: A0 + executor: true + trap: 0xA059 + executor_extras: ClearD0 + +# #### + +- function: + name: PrimeTime + args: + - name: taskp + type: QElemPtr + register: A0 + - name: count + type: LONGINT + register: D0 + executor: true + trap: 0xA05A + executor_extras: ClearD0 diff --git a/defs/ToolboxEvent.yaml b/defs/ToolboxEvent.yaml new file mode 100644 index 0000000..240e3e5 --- /dev/null +++ b/defs/ToolboxEvent.yaml @@ -0,0 +1,182 @@ +- lowmem: + name: KeyThresh + type: INTEGER + address: 0x18E + comment: | + ToolboxEvent IMI-246 (true); + +# #### + +- lowmem: + name: KeyRepThresh + type: INTEGER + address: 0x190 + comment: | + ToolboxEvent IMI-246 (true); + +# #### + +- lowmem: + name: DoubleTime + type: LONGINT + address: 0x2F0 + comment: | + ToolboxEvent IMI-260 (true); + +# #### + +- lowmem: + name: CaretTime + type: LONGINT + address: 0x2F4 + comment: | + ToolboxEvent IMI-260 (true); + +# #### + +- lowmem: + name: ScrDmpEnb + type: Byte + address: 0x2F8 + comment: | + ToolboxEvent IMI-258 (true); + +# #### + +- lowmem: + name: JournalFlag + type: INTEGER + address: 0x8DE + comment: | + ToolboxEvent IMI-261 (false); + +# #### + +- lowmem: + name: JournalRef + type: INTEGER + address: 0x8E8 + comment: | + ToolboxEvent IMI-261 (false); + +# #### + +- function: + name: KeyTranslate + return: LONGINT + args: + - name: mapp + type: Ptr + - name: code + type: uint16_t + - name: state + type: LONGINT* + trap: 0xA9C3 + executor: C_ + +# #### + +- function: + name: GetNextEvent + return: Boolean + args: + - name: em + type: INTEGER + - name: evt + type: EventRecord* + trap: 0xA970 + executor: C_ + +# #### + +- function: + name: WaitNextEvent + return: Boolean + args: + - name: mask + type: INTEGER + - name: evp + type: EventRecord* + - name: sleep + type: LONGINT + - name: mousergn + type: RgnHandle + trap: 0xA860 + executor: C_ + +# #### + +- function: + name: EventAvail + return: Boolean + args: + - name: em + type: INTEGER + - name: evt + type: EventRecord* + trap: 0xA971 + executor: C_ + +# #### + +- function: + name: GetMouse + args: + - name: p + type: Point* + trap: 0xA972 + executor: C_ + +# #### + +- function: + name: Button + return: Boolean + trap: 0xA974 + executor: C_ + +# #### + +- function: + name: StillDown + return: Boolean + trap: 0xA973 + executor: C_ + +# #### + +- function: + name: WaitMouseUp + return: Boolean + trap: 0xA977 + executor: C_ + +# #### + +- function: + name: GetKeys + args: + - name: keys + type: uint8_t* + trap: 0xA976 + executor: C_ + +# #### + +- function: + name: TickCount + return: LONGINT + trap: 0xA975 + executor: C_ + +# #### + +- function: + name: GetDblTime + return: LONGINT + +# #### + +- function: + name: GetCaretTime + return: LONGINT diff --git a/defs/ToolboxUtil.yaml b/defs/ToolboxUtil.yaml new file mode 100644 index 0000000..1aedcde --- /dev/null +++ b/defs/ToolboxUtil.yaml @@ -0,0 +1,553 @@ +- enum: + values: + - name: sysPatListID + value: 0 + +# #### + +- enum: + values: + - name: iBeamCursor + value: 1 + - name: crossCursor + value: 2 + - name: plusCursor + value: 3 + - name: watchCursor + value: 4 + +# #### + +- struct: + name: Int64Bit + members: + - name: hiLong + type: LONGINT + - name: loLong + type: LONGINT + size: 8 + +# #### + +- typedef: + name: PatPtr + type: Pattern* + +# #### + +- typedef: + name: PatHandle + type: PatPtr* + +# #### + +- function: + name: FracSqrt + return: Fract + args: + - name: x + type: Fract + trap: 0xA849 + executor: C_ + +# #### + +- function: + name: FracSin + return: Fract + args: + - name: x + type: Fixed + trap: 0xA848 + executor: C_ + +# #### + +- function: + name: FixATan2 + return: Fixed + args: + - name: x + type: LONGINT + - name: y + type: LONGINT + trap: 0xA818 + executor: C_ + +# #### + +- function: + name: FracCos + return: Fract + args: + - name: x + type: Fixed + trap: 0xA847 + executor: C_ + +# #### + +- function: + name: FixRatio + return: Fixed + args: + - name: n + type: INTEGER + - name: d + type: INTEGER + trap: 0xA869 + executor: C_ + +# #### + +- function: + name: FixMul + return: Fixed + args: + - name: a + type: Fixed + - name: b + type: Fixed + trap: 0xA868 + executor: C_ + +# #### + +- function: + name: FixRound + return: INTEGER + args: + - name: x + type: Fixed + trap: 0xA86C + executor: C_ + +# #### + +- function: + name: NewString + return: StringHandle + args: + - name: s + type: ConstStringPtr + trap: 0xA906 + executor: C_ + +# #### + +- function: + name: SetString + args: + - name: h + type: StringHandle + - name: s + type: ConstStringPtr + trap: 0xA907 + executor: C_ + +# #### + +- function: + name: GetString + return: StringHandle + args: + - name: i + type: INTEGER + trap: 0xA9BA + executor: C_ + +# #### + +- function: + name: GetIndString + args: + - name: s + type: StringPtr + - name: sid + type: INTEGER + - name: index + type: INTEGER + executor: C_ + +# #### + +- function: + name: Munger + return: LONGINT + args: + - name: h + type: Handle + - name: "off" + type: LONGINT + - name: p1 + type: Ptr + - name: len1 + type: LONGINT + - name: p2 + type: Ptr + - name: len2 + type: LONGINT + trap: 0xA9E0 + executor: C_ + +# #### + +- function: + name: PackBits + args: + - name: sp + type: Ptr* + - name: dp + type: Ptr* + - name: len + type: INTEGER + trap: 0xA8CF + executor: C_ + +# #### + +- function: + name: UnpackBits + args: + - name: sp + type: Ptr* + - name: dp + type: Ptr* + - name: len + type: INTEGER + trap: 0xA8D0 + executor: C_ + +# #### + +- function: + name: BitTst + return: Boolean + args: + - name: bp + type: Ptr + - name: bn + type: LONGINT + trap: 0xA85D + executor: C_ + +# #### + +- function: + name: BitSet + args: + - name: bp + type: Ptr + - name: bn + type: LONGINT + trap: 0xA85E + executor: C_ + +# #### + +- function: + name: BitClr + args: + - name: bp + type: Ptr + - name: bn + type: LONGINT + trap: 0xA85F + executor: C_ + +# #### + +- function: + name: BitAnd + return: LONGINT + args: + - name: a + type: LONGINT + - name: b + type: LONGINT + trap: 0xA858 + executor: C_ + +# #### + +- function: + name: BitOr + return: LONGINT + args: + - name: a + type: LONGINT + - name: b + type: LONGINT + trap: 0xA85B + executor: C_ + +# #### + +- function: + name: BitXor + return: LONGINT + args: + - name: a + type: LONGINT + - name: b + type: LONGINT + trap: 0xA859 + executor: C_ + +# #### + +- function: + name: BitNot + return: LONGINT + args: + - name: a + type: LONGINT + trap: 0xA85A + executor: C_ + +# #### + +- function: + name: BitShift + return: LONGINT + args: + - name: a + type: LONGINT + - name: n + type: INTEGER + trap: 0xA85C + executor: C_ + +# #### + +- function: + name: HiWord + return: INTEGER + args: + - name: a + type: LONGINT + trap: 0xA86A + executor: C_ + +# #### + +- function: + name: LoWord + return: INTEGER + args: + - name: a + type: LONGINT + trap: 0xA86B + executor: C_ + +# #### + +- function: + name: LongMul + args: + - name: a + type: LONGINT + - name: b + type: LONGINT + - name: c + type: Int64Bit* + trap: 0xA867 + executor: C_ + +# #### + +- function: + name: GetPattern + return: PatHandle + args: + - name: id + type: INTEGER + trap: 0xA9B8 + executor: C_ + +# #### + +- function: + name: GetIndPattern + args: + - name: op + type: Byte* + - name: plistid + type: INTEGER + - name: index + type: INTEGER + +# #### + +- function: + name: GetCursor + return: CursHandle + args: + - name: id + type: INTEGER + trap: 0xA9B9 + executor: C_ + +# #### + +- function: + name: GetPicture + return: PicHandle + args: + - name: id + type: INTEGER + trap: 0xA9BC + executor: C_ + +# #### + +- function: + name: DeltaPoint + return: LONGINT + args: + - name: a + type: Point + - name: b + type: Point + trap: 0xA94F + executor: C_ + +# #### + +- function: + name: SlopeFromAngle + return: Fixed + args: + - name: a + type: INTEGER + trap: 0xA8BC + executor: C_ + +# #### + +- function: + name: AngleFromSlope + return: INTEGER + args: + - name: s + type: Fixed + trap: 0xA8C4 + executor: C_ + +# #### + +- function: + name: FracMul + return: Fract + args: + - name: x + type: Fract + - name: y + type: Fract + trap: 0xA84A + executor: C_ + +# #### + +- function: + name: FixDiv + return: Fixed + args: + - name: x + type: Fixed + - name: y + type: Fixed + trap: 0xA84D + executor: C_ + +# #### + +- function: + name: FracDiv + return: Fract + args: + - name: x + type: Fract + - name: y + type: Fract + trap: 0xA84B + executor: C_ + +# #### + +- function: + name: Long2Fix + return: Fixed + args: + - name: x + type: LONGINT + trap: 0xA83F + executor: C_ + +# #### + +- function: + name: Fix2Long + return: LONGINT + args: + - name: x + type: Fixed + trap: 0xA840 + executor: C_ + +# #### + +- function: + name: Fix2Frac + return: Fract + args: + - name: x + type: Fixed + trap: 0xA841 + executor: C_ + +# #### + +- function: + name: Frac2Fix + return: Fixed + args: + - name: x + type: Fract + trap: 0xA842 + executor: C_ + +# #### + +- executor_only: + code: | + // TODO: + // Executor will need to provide both 80-bit extended versions as trap + // and 64-bit double versions for PPC. + // Multiversal Interfaces might also need to declare a 96-bit extended version for 68881. + extern Extended Fix2X(Fixed x); + extern Fixed X2Fix(Extended *xp); + extern Extended Frac2X(Fract x); + extern Fract X2Frac(Extended *xp); + +# #### + +- function: + name: R_X2Fix + return: Fixed + args: + - name: x + type: extended80* + trap: 0xA844 + executor: C_ + +# #### + +- function: + name: R_X2Frac + return: Fract + args: + - name: x + type: extended80* + trap: 0xA846 + executor: C_ diff --git a/defs/VDriver.yaml b/defs/VDriver.yaml new file mode 100644 index 0000000..0ab2314 --- /dev/null +++ b/defs/VDriver.yaml @@ -0,0 +1,96 @@ +- struct: + name: VDParamBlock + members: + - common: COMMONFSQUEUEDEFS + - name: ioRefNum + type: INTEGER + - name: csCode + type: INTEGER + - name: csParam + type: Ptr + +# #### + +- typedef: + name: VDParamBlockPtr + type: VDParamBlock* + +# #### + +- struct: + name: VDEntryRecord + members: + - name: csTable + type: Ptr + - name: csStart + type: INTEGER + - name: csCount + type: INTEGER + +# #### + +- typedef: + name: VDEntRecPtr + type: VDEntryRecord* + +# #### + +- struct: + name: VDGammaRecord + members: + - name: csGTable + type: Ptr + +# #### + +- typedef: + name: VDGamRecPtr + type: VDGammaRecord* + +# #### + +- struct: + name: VDPgInfo + members: + - name: csMode + type: INTEGER + - name: csData + type: LONGINT + - name: csPage + type: INTEGER + - name: csBaseAddr + type: Ptr + +# #### + +- typedef: + name: VDPgInfoPtr + type: VDPgInfo* + +# #### + +- struct: + name: VDFlagRec + members: + - name: flag + type: SignedByte + +# #### + +- typedef: + name: VDFlagPtr + type: VDFlagRec* + +# #### + +- struct: + name: VDDefModeRec + members: + - name: spID + type: SignedByte + +# #### + +- typedef: + name: VDDefModePtr + type: VDDefModeRec* diff --git a/defs/VRetraceMgr.yaml b/defs/VRetraceMgr.yaml new file mode 100644 index 0000000..1caabf4 --- /dev/null +++ b/defs/VRetraceMgr.yaml @@ -0,0 +1,111 @@ +- enum: + values: + - name: qErr + value: -1 + - name: vTypErr + value: -2 + +# #### + +- struct: + name: VBLTask + members: + - name: qLink + type: QElemPtr + - name: qType + type: INTEGER + - name: vblAddr + type: ProcPtr + - name: vblCount + type: INTEGER + - name: vblPhase + type: INTEGER + size: 14 + +# #### + +- typedef: + name: VBLTaskPtr + type: VBLTask* + +# #### + +- lowmem: + name: VBLQueue + type: QHdr + address: 0x160 + comment: | + VRetraceMgr IMII-352 (true); + +# #### + +- lowmem: + name: JVBLTask + type: ProcPtr + address: 0xD28 + comment: | + VRetraceMgr IMV (false); + +# #### + +- function: + name: VInstall + return: OSErr + args: + - name: vtaskp + type: VBLTaskPtr + register: A0 + executor: true + trap: 0xA033 + returnreg: D0 + +# #### + +- function: + name: VRemove + return: OSErr + args: + - name: vtaskp + type: VBLTaskPtr + register: A0 + executor: true + trap: 0xA034 + returnreg: D0 + +# #### + +- function: + name: GetVBLQHdr + return: QHdrPtr + +# #### + +- function: + name: SlotVInstall + return: OSErr + args: + - name: vtaskp + type: VBLTaskPtr + register: A0 + - name: slot + type: INTEGER + register: D0 + executor: true + trap: 0xA06F + returnreg: D0 + +# #### + +- function: + name: SlotVRemove + return: OSErr + args: + - name: vtaskp + type: VBLTaskPtr + register: A0 + - name: slot + type: INTEGER + register: D0 + executor: true + trap: 0xA070 + returnreg: D0 diff --git a/defs/WindowMgr.yaml b/defs/WindowMgr.yaml new file mode 100644 index 0000000..f1e0fda --- /dev/null +++ b/defs/WindowMgr.yaml @@ -0,0 +1,1148 @@ +- enum: + values: + - name: documentProc + value: 0 + - name: dBoxProc + value: 1 + - name: plainDBox + value: 2 + - name: altDBoxProc + value: 3 + - name: noGrowDocProc + value: 4 + - name: movableDBoxProc + value: 5 + - name: rDocProc + value: 16 + +# #### + +- enum: + values: + - name: dialogKind + value: 2 + - name: userKind + value: 8 + +# #### + +- enum: + values: + - name: inDesk + value: 0 + - name: inMenuBar + value: 1 + - name: inSysWindow + value: 2 + - name: inContent + value: 3 + - name: inDrag + value: 4 + - name: inGrow + value: 5 + - name: inGoAway + value: 6 + +# #### + +- enum: + values: + - name: noConstraint + value: 0 + - name: hAxisOnly + value: 1 + - name: vAxisOnly + value: 2 + +# #### + +- enum: + values: + - name: wDraw + value: 0 + - name: wHit + value: 1 + - name: wCalcRgns + value: 2 + - name: wNew + value: 3 + - name: wDispose + value: 4 + - name: wGrow + value: 5 + - name: wDrawGIcon + value: 6 + +# #### + +- enum: + values: + - name: kWindowMsgDraw + value: 0 + - name: kWindowMsgHitTest + value: 1 + - name: kWindowMsgCalculateShape + value: 2 + - name: kWindowMsgInitialize + value: 3 + - name: kWindowMsgCleanUp + value: 4 + - name: kWindowMsgDrawGrowOutline + value: 5 + - name: kWindowMsgDrawGrowBox + value: 6 + +# #### + +- enum: + values: + - name: wNoHit + value: 0 + - name: wInContent + value: 1 + - name: wInDrag + value: 2 + - name: wInGrow + value: 3 + - name: wInGoAway + value: 4 + +# #### + +- enum: + values: + - name: wContentColor + value: 0 + - name: wFrameColor + value: 1 + - name: wTextColor + value: 2 + - name: wHiliteColor + value: 3 + - name: wTitleBarColor + value: 4 + - name: wHiliteColorLight + value: 5 + - name: wHiliteColorDark + value: 6 + - name: wTitleBarLight + value: 7 + - name: wTitleBarDark + value: 8 + - name: wDialogLight + value: 9 + - name: wDialogDark + value: 10 + - name: wTingeLight + value: 11 + - name: wTingeDark + value: 12 + comment: | + color table entries + +# #### + +- enum: + values: + - name: deskPatID + value: 16 + +# #### + +- typedef: + name: WindowPtr + type: GrafPtr + +# #### + +- typedef: + name: CWindowPtr + type: CGrafPtr + +# #### + +- struct: + name: ControlRecord + +# #### + +- typedef: + name: ControlPtr + type: ControlRecord* + +# #### + +- typedef: + name: ControlHandle + type: ControlPtr* + +# #### + +- struct: + name: WindowRecord + members: + - name: port + type: GrafPort + - name: windowKind + type: INTEGER + - name: visible + type: Boolean + - name: hilited + type: Boolean + - name: goAwayFlag + type: Boolean + - name: spareFlag + type: Boolean + - name: strucRgn + type: RgnHandle + - name: contRgn + type: RgnHandle + - name: updateRgn + type: RgnHandle + - name: windowDefProc + type: Handle + - name: dataHandle + type: Handle + - name: titleHandle + type: StringHandle + - name: titleWidth + type: INTEGER + - name: controlList + type: ControlHandle + - name: nextWindow + type: WindowRecord* + - name: windowPic + type: PicHandle + - name: refCon + type: LONGINT + size: 156 + +# #### + +- typedef: + name: WindowPeek + type: WindowRecord* + +# #### + +- struct: + name: WStateData + members: + - name: userState + type: Rect + - name: stdState + type: Rect + size: 16 + +# #### + +- enum: + values: + - name: inZoomIn + value: 7 + - name: inZoomOut + value: 8 + +# #### + +- enum: + values: + - name: wInZoomIn + value: 5 + - name: wInZoomOut + value: 6 + +# #### + +- struct: + name: AuxWinRec + +# #### + +- typedef: + name: AuxWinPtr + type: AuxWinRec* + +# #### + +- typedef: + name: AuxWinHandle + type: AuxWinPtr* + +# #### + +- struct: + name: AuxWinRec + members: + - name: awNext + type: AuxWinHandle + - name: awOwner + type: WindowPtr + - name: awCTable + type: CTabHandle + - name: dialogCItem + type: Handle + - name: awFlags + type: LONGINT + - name: awReserved + type: CTabHandle + - name: awRefCon + type: LONGINT + size: 28 + +# #### + +- funptr: + return: LONGINT + args: + - name: varcode + type: INTEGER + - name: wp + type: WindowPtr + - name: message + type: INTEGER + - name: param + type: LONGINT + name: WindowDefUPP + +# #### + +- lowmem: + name: WindowList + type: WindowPeek + address: 0x9D6 + comment: | + WindowMgr IMI-274 (true); + +# #### + +- lowmem: + name: SaveUpdate + type: INTEGER + address: 0x9DA + comment: | + WindowMgr IMI-297 (true); + +# #### + +- lowmem: + name: PaintWhite + type: INTEGER + address: 0x9DC + comment: | + WindowMgr IMI-297 (true); + +# #### + +- lowmem: + name: WMgrPort + type: GrafPtr + address: 0x9DE + comment: | + WindowMgr IMI-282 (true); + +# #### + +- lowmem: + name: WMgrCPort + type: CGrafPtr + address: 0xD2C + comment: | + QuickDraw IMV-205 (false); + +# #### + +- lowmem: + name: OldStructure + type: RgnHandle + address: 0x9E6 + comment: | + WindowMgr IMI-296 (true); + +# #### + +- lowmem: + name: OldContent + type: RgnHandle + address: 0x9EA + comment: | + WindowMgr IMI-296 (true); + +# #### + +- lowmem: + name: GrayRgn + type: RgnHandle + address: 0x9EE + comment: | + WindowMgr IMI-282 (true); + +# #### + +- lowmem: + name: SaveVisRgn + type: RgnHandle + address: 0x9F2 + comment: | + WindowMgr IMI-293 (true); + +# #### + +- lowmem: + name: DragHook + type: ProcPtr + address: 0x9F6 + comment: | + WindowMgr IMI-324 (true); + +# #### + +- lowmem: + name: DragPattern + type: Pattern + address: 0xA34 + comment: | + WindowMgr IMI-324 (true); + +# #### + +- lowmem: + name: DeskPattern + type: Pattern + address: 0xA3C + comment: | + WindowMgr IMI-282 (true); + +# #### + +- lowmem: + name: CurActivate + type: WindowPtr + address: 0xA64 + comment: | + WindowMgr IMI-280 (true); + +# #### + +- lowmem: + name: CurDeactive + type: WindowPtr + address: 0xA68 + comment: | + WindowMgr IMI-280 (true); + +# #### + +- lowmem: + name: DeskHook + type: ProcPtr + address: 0xA6C + comment: | + WindowMgr IMI-282 (true); + +# #### + +- lowmem: + name: GhostWindow + type: WindowPtr + address: 0xA84 + comment: | + WindowMgr IMI-287 (true); + +# #### + +- lowmem: + name: AuxWinHead + type: AuxWinHandle + address: 0xCD0 + comment: | + WindowMgr IMV-200 (true); + +# #### + +- lowmem: + name: DeskCPat + type: PixPatHandle + address: 0xCD8 + comment: | + WindowMgr SysEqua.a (true); + +# #### + +- executor_only: + code: | + inline RgnHandle GetGrayRgn() { return LM(GrayRgn); } + NOTRAP_FUNCTION2(GetGrayRgn); + +# #### + +- function: + name: SetWTitle + args: + - name: w + type: WindowPtr + - name: t + type: ConstStringPtr + trap: 0xA91A + executor: C_ + +# #### + +- function: + name: GetWTitle + args: + - name: w + type: WindowPtr + - name: t + type: StringPtr + trap: 0xA919 + executor: C_ + +# #### + +- function: + name: FrontWindow + return: WindowPtr + trap: 0xA924 + executor: C_ + +# #### + +- function: + name: HiliteWindow + args: + - name: w + type: WindowPtr + - name: flag + type: Boolean + trap: 0xA91C + executor: C_ + +# #### + +- function: + name: BringToFront + args: + - name: w + type: WindowPtr + trap: 0xA920 + executor: C_ + +# #### + +- function: + name: SelectWindow + args: + - name: w + type: WindowPtr + trap: 0xA91F + executor: C_ + +# #### + +- function: + name: ShowHide + args: + - name: w + type: WindowPtr + - name: flag + type: Boolean + trap: 0xA908 + executor: C_ + +# #### + +- function: + name: HideWindow + args: + - name: w + type: WindowPtr + trap: 0xA916 + executor: C_ + +# #### + +- function: + name: ShowWindow + args: + - name: w + type: WindowPtr + trap: 0xA915 + executor: C_ + +# #### + +- function: + name: SendBehind + args: + - name: w + type: WindowPtr + - name: behind + type: WindowPtr + trap: 0xA921 + executor: C_ + +# #### + +- function: + name: DrawGrowIcon + args: + - name: w + type: WindowPtr + trap: 0xA904 + executor: C_ + +# #### + +- function: + name: InitWindows + trap: 0xA912 + executor: C_ + +# #### + +- function: + name: GetWMgrPort + args: + - name: wp + type: GrafPtr* + trap: 0xA910 + executor: C_ + +# #### + +- function: + name: NewWindow + return: WindowPtr + args: + - name: wst + type: void* + - name: r + type: const Rect* + - name: title + type: ConstStringPtr + - name: vis + type: Boolean + - name: procid + type: INTEGER + - name: behind + type: WindowPtr + - name: gaflag + type: Boolean + - name: rc + type: LONGINT + trap: 0xA913 + executor: C_ + +# #### + +- function: + name: GetNewWindow + return: WindowPtr + args: + - name: wid + type: INTEGER + - name: wst + type: void* + - name: behind + type: WindowPtr + trap: 0xA9BD + executor: C_ + +# #### + +- function: + name: CloseWindow + args: + - name: w + type: WindowPtr + trap: 0xA92D + executor: C_ + +# #### + +- function: + name: NewCWindow + return: WindowPtr + args: + - name: storage + type: void* + - type: const Rect* + - type: ConstStringPtr + - type: Boolean + - type: INTEGER + - type: WindowPtr + - type: Boolean + - type: LONGINT + trap: 0xAA45 + executor: C_ + +# #### + +- function: + name: GetNewCWindow + return: WindowPtr + args: + - type: INTEGER + - type: void* + - type: WindowPtr + trap: 0xAA46 + executor: C_ + +# #### + +- function: + name: DisposeWindow + args: + - name: w + type: WindowPtr + trap: 0xA914 + executor: C_ + +# #### + +- function: + name: SetWRefCon + args: + - name: w + type: WindowPtr + - name: data + type: LONGINT + trap: 0xA918 + executor: C_ + +# #### + +- function: + name: GetWRefCon + return: LONGINT + args: + - name: w + type: WindowPtr + trap: 0xA917 + executor: C_ + +# #### + +- function: + name: SetWindowPic + args: + - name: w + type: WindowPtr + - name: p + type: PicHandle + trap: 0xA92E + executor: C_ + +# #### + +- function: + name: GetWindowPic + return: PicHandle + args: + - name: w + type: WindowPtr + trap: 0xA92F + executor: C_ + +# #### + +- function: + name: PinRect + return: LONGINT + args: + - name: r + type: const Rect* + - name: p + type: Point + trap: 0xA94E + executor: C_ + +# #### + +- function: + name: DragTheRgn + return: LONGINT + args: + - name: rgn + type: RgnHandle + - name: startp + type: Point + - name: limit + type: const Rect* + - name: slop + type: const Rect* + - name: axis + type: INTEGER + - name: proc + type: ProcPtr + trap: 0xA926 + executor: C_ + +# #### + +- function: + name: DragGrayRgn + return: LONGINT + args: + - name: rgn + type: RgnHandle + - name: startp + type: Point + - name: limit + type: const Rect* + - name: slop + type: const Rect* + - name: axis + type: INTEGER + - name: proc + type: ProcPtr + trap: 0xA905 + executor: C_ + +# #### + +- function: + name: ClipAbove + args: + - name: w + type: WindowPeek + trap: 0xA90B + executor: C_ + +# #### + +- function: + name: CheckUpdate + return: Boolean + args: + - name: ev + type: EventRecord* + trap: 0xA911 + executor: C_ + +# #### + +- function: + name: SaveOld + args: + - name: w + type: WindowPeek + trap: 0xA90E + executor: C_ + +# #### + +- function: + name: PaintOne + args: + - name: w + type: WindowPeek + - name: clobbered + type: RgnHandle + trap: 0xA90C + executor: C_ + +# #### + +- function: + name: PaintBehind + args: + - name: w + type: WindowPeek + - name: clobbered + type: RgnHandle + trap: 0xA90D + executor: C_ + +# #### + +- function: + name: CalcVis + args: + - name: w + type: WindowPeek + trap: 0xA909 + executor: C_ + +# #### + +- function: + name: CalcVisBehind + args: + - name: w + type: WindowPeek + - name: clobbered + type: RgnHandle + trap: 0xA90A + executor: C_ + +# #### + +- function: + name: DrawNew + args: + - name: w + type: WindowPeek + - name: flag + type: Boolean + trap: 0xA90F + executor: C_ + +# #### + +- function: + name: GetWVariant + return: INTEGER + args: + - name: w + type: WindowPtr + trap: 0xA80A + executor: C_ + +# #### + +- function: + name: FindWindow + return: INTEGER + args: + - name: p + type: Point + - name: wpp + type: WindowPtr* + trap: 0xA92C + executor: C_ + +# #### + +- function: + name: TrackBox + return: Boolean + args: + - name: wp + type: WindowPtr + - name: pt + type: Point + - name: part + type: INTEGER + trap: 0xA83B + executor: C_ + +# #### + +- function: + name: TrackGoAway + return: Boolean + args: + - name: w + type: WindowPtr + - name: p + type: Point + trap: 0xA91E + executor: C_ + +# #### + +- function: + name: ZoomWindow + args: + - name: wp + type: WindowPtr + - name: part + type: INTEGER + - name: front + type: Boolean + trap: 0xA83A + executor: C_ + +# #### + +- function: + name: MoveWindow + args: + - name: wp + type: WindowPtr + - name: h + type: INTEGER + - name: v + type: INTEGER + - name: front + type: Boolean + trap: 0xA91B + executor: C_ + +# #### + +- function: + name: DragWindow + args: + - name: wp + type: WindowPtr + - name: p + type: Point + - name: rp + type: const Rect* + trap: 0xA925 + executor: C_ + +# #### + +- function: + name: GrowWindow + return: LONGINT + args: + - name: w + type: WindowPtr + - name: startp + type: Point + - name: rp + type: const Rect* + trap: 0xA92B + executor: C_ + +# #### + +- function: + name: SizeWindow + args: + - name: w + type: WindowPtr + - name: width + type: INTEGER + - name: height + type: INTEGER + - name: flag + type: Boolean + trap: 0xA91D + executor: C_ + +# #### + +- function: + name: InvalRect + args: + - name: r + type: const Rect* + trap: 0xA928 + executor: C_ + +# #### + +- function: + name: InvalRgn + args: + - name: r + type: RgnHandle + trap: 0xA927 + executor: C_ + +# #### + +- function: + name: ValidRect + args: + - name: r + type: const Rect* + trap: 0xA92A + executor: C_ + +# #### + +- function: + name: ValidRgn + args: + - name: r + type: RgnHandle + trap: 0xA929 + executor: C_ + +# #### + +- function: + name: BeginUpdate + args: + - name: w + type: WindowPtr + trap: 0xA922 + executor: C_ + +# #### + +- function: + name: EndUpdate + args: + - name: w + type: WindowPtr + trap: 0xA923 + executor: C_ + +# #### + +- function: + name: SetWinColor + args: + - name: w + type: WindowPtr + - name: new_w_ctab + type: CTabHandle + trap: 0xAA41 + executor: C_ + +# #### + +- function: + name: SetDeskCPat + args: + - type: PixPatHandle + trap: 0xAA47 + executor: C_ + +# #### + +- function: + name: GetAuxWin + return: Boolean + args: + - type: WindowPtr + - type: AuxWinHandle* + trap: 0xAA42 + executor: C_ + +# #### + +- typedef: + name: WindowRef + type: WindowPtr + +# #### + +- not-for: executor + function: + name: GetWindowKind + return: INTEGER + args: + - type: WindowRef + name: win + inline: ((WindowPeek)(win))->windowKind + +# #### + +- not-for: executor + function: + name: SetPortWindowPort + args: + - type: WindowRef + name: win + inline: SetPort(win) + +# #### + +- not-for: executor + function: + name: GetWindowPortBounds + args: + - type: WindowRef + name: window + - type: Rect* + name: bounds + inline: "*(bounds) = (window)->portRect"