View Single Post
Old 13 May 2018, 11:06   #8
borchen
Registered User

 
Join Date: Jan 2016
Location: NL
Posts: 31
@Ozzyboshi

Hi, I was just playing around with your code.
At first just to get it running and see what you made.
I had to replace the stopOS/startOS code with Photon(tm)'s code to stop it from crashing on exit.

Apparently you use the blitter to copy 14 words of jaw-data, which works fine.

But it uses 2 btst's, 7 move.w's and 2 move.l's to setup the blitter and then the blitter has to start doing it's job. Isn't this a bit overkill?

So (after some trial-and-error) I replaced the BLTCPY-MACRO/routine with the following CPUCPY-MACRO/routine:

Warning! This MACRO uses registers d1 to d7, so save it's contents if necessary (which is not a problem in this case)
Code:
CPUCPY:	MACRO
	movem.l	\1,d1-d7		; 7 registers = 14 words
	movem.l	d1-d7,\2
	ENDM
To use this MACRO:
Code:
	; open skull jaw - pasting data using the CPU
	CPUCPY	JAWLOPEN,JAW2		; left
	CPUCPY	JAWROPEN,JAW3		; right
and
Code:
	; close skull jaw - pasting data using the CPU
	CPUCPY	JAWLCLOSED,JAW2		; left
	CPUCPY	JAWRCLOSED,JAW3		; right
borchen is offline  
 
Page generated in 0.04132 seconds with 11 queries