[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Low level Macivory interface
Date: Wed, 14 Nov 90 10:21:28 GMT
From: bwild%fzi.uka.de@RELAY.CS.NET (Bernd Wild)
We have then put together a MacIvory board and a Transputer board
into our MacII in order to make a shared memory communication
between both boards. We have already succeeded in have them
running simultaneously in peace, one under Genera 8.0.1 and the
other under Helios. The problem now is the coupling between
both systems. While the transputer has an archaic 1-byte communication
buffer/channel at a fixed memory address the Symbolics source code
gives no indications about the implementation of low level
memory addressing of absolut NuBus addresses. We traced the function
%MEMORY-READ and %MEMORY-WRITE but the essential sources are in
a IPRIMITIVES.LISP file we don't have.
%MEMORY-READ and %MEMORY-WRITE are hardware instructions of the Ivory
chip so having the IPRIMITIVES file wouldn't tell you much. In any case
they are documented online.
Is there anybody who knows something about writing/reading at/from an
absolut NuBus address
You can use this interim function until Symbolics provides NuBus support
in the sys:bus-read and sys:bus-write functions. For example,
(sys:%memory-read (sys:%make-nubus-slot-address #xC 0))
Be very careful using these functions, it's easy to crash your Macintosh and
I wouldn't be surprised if you could do actual damage to the hardware if there
are some devices on the NuBus that will damage themselves if you send them an
incorrect command or if you accidentally write all over the Macintosh operating
system.
;;; -*- Mode: LISP; Syntax: Zetalisp; Package: SYSTEM-INTERNALS; Base: 8; Patch-File: T -*-
;;; Patch file for Private version 0.0
;;; Reason: Function SYS:%MAKE-NUBUS-ADDRESS: Convert Nubus address to Ivory address.
;;; Function SYS:%MAKE-NUBUS-SLOT-ADDRESS: Access superslot space.
;;; Written by Moon, 10/12/88 12:14:41
(SYSTEM-INTERNALS:FILES-PATCHED-IN-THIS-PATCH-FILE
"SYS:SYS2;MACRO.LISP.67")
(NOTE-PRIVATE-PATCH "%make-nubus-address")
(EVAL-WHEN (EVAL LOAD COMPILE)
(GLOBALIZE "%MAKE-NUBUS-SLOT-ADDRESS" "SYSTEM")
(GLOBALIZE "%MAKE-NUBUS-ADDRESS" "SYSTEM"))
;=====================================
(SYSTEM-INTERNALS:BEGIN-PATCH-SECTION)
(SYSTEM-INTERNALS:PATCH-SECTION-SOURCE-FILE "SYS:SYS2;MACRO.LISP.67")
(SYSTEM-INTERNALS:PATCH-SECTION-ATTRIBUTES
"-*- Mode:LISP; Package:SYSTEM-INTERNALS; Base:8; Syntax: Zetalisp -*-")
(DEFUN %MAKE-NUBUS-ADDRESS (ADDRESS)
(SYSTEM-CASE
(MACIVORY NIL)
(OTHERWISE (ERROR "Only MacIvory systems have a NuBus")))
(%MAKE-PHYSICAL-ADDRESS (%LOGDPB 1 (BYTE 2 30.)
(%LOGLDB (BYTE 30. 2) ADDRESS))))
(DEFSUBST %MAKE-NUBUS-SLOT-ADDRESS (SLOT ADDRESS)
(%MAKE-NUBUS-ADDRESS (%LOGDPB SLOT (BYTE 4 28.) ADDRESS)))