Split out some of rdisk.h into rdisk_syscall.h

This commit is contained in:
Zane Kaminski 2022-12-19 00:06:43 -05:00
parent 6b3a25a67d
commit 27bc0889df
3 changed files with 14 additions and 6 deletions

View File

@ -7,6 +7,7 @@
#include <OSUtils.h>
#include "rdisk.h"
#include "rdisk_syscall.h"
// Decode keyboard settings
static void RDDecodeKeySettings(RDiskStorage_t *c) {

View File

@ -14,12 +14,6 @@
#define RDISK_COMPRESS_ICON_ENABLE
#pragma parameter __D0 RDReadXPRAM(__D0, __D1, __A0)
OSErr RDReadXPRAM(short numBytes, short whichByte, Ptr dest) = {0x4840, 0x3001, 0xA051};
#pragma parameter __D0 RDiskAddDrive(__D1, __D0, __A0)
OSErr RDiskAddDrive(short drvrRefNum, short drvNum, DrvQElPtr dq) = {0x4840, 0x3001, 0xA04E};
static inline char IsAPressed() { return *((volatile char*)0x174) & 0x01; }
static inline char IsRPressed() { return *((volatile char*)0x175) & 0x80; }

13
rdisk_syscall.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef RDISK_SYSCALL_H
#define RDISK_SYSCALL_H
#include <Disks.h>
#include <OSUtils.h>
#pragma parameter __D0 RDReadXPRAM(__D0, __D1, __A0)
OSErr RDReadXPRAM(short numBytes, short whichByte, Ptr dest) = {0x4840, 0x3001, 0xA051};
#pragma parameter __D0 RDiskAddDrive(__D1, __D0, __A0)
OSErr RDiskAddDrive(short drvrRefNum, short drvNum, DrvQElPtr dq) = {0x4840, 0x3001, 0xA04E};
#endif