|
I seem to have lost the original topic forthos of you who aske for
this this however it seems
relevant here and and I found the time to post it so here goes.
This is an extract from "FEEDBACK" the official magazine of the
YAMAHA "X" series owners group.
Quote -------
This program is a simple routine to send MIDI codes from the SFG MIDI
out socket. This version will only run on CX5M Mk1. The program
addresses the SFG module and therefore will not run unless the module
is connected.
10 CLEAR 200,& HDE00
20 DATA 3E,0C,D3,A8,3E,65,32,F6,7F,3A,00,DE,32,F5,7F,3E,00,D3,A8,C9
30 FOR Z=1 TO 20
40 READ D$
50 POKE & HDE00+Z,VAL("CH"+D$)
60 NEXT Z
70 DEFUSR=HDE01
80 INPUT D$
90 POKE & HDE00,VAL("&H"+D$)
100 A=USR(A)
110 GOTO 80
120 END
In response to the ? enter a single byte HEX data followed by return.
The entered data is then sent across midi. We hope to print future
updates to this program in future magazines.
Unqoute -
Can any Z80 officionados tell me what this program is doing?
I take no responsibility for the performance of this program I haven't
tried it myself. However I would aprreciate hearing how you get
on with it.
Paul.
|
| Paul,
I took a stab at the program you left in here and it will work
with a couple of corrections to typos. IN line 50 change the "CH"
to "&H" and in line 70 should be:
70 DEFUSR=&HDE01
As you may know, the bytes in line 20 are machine code that is
executed as a user routine defined in line 70 and called in line 100.
This machine code is stored in RAM addresses DE01 through DE14. The
single byte that you want to send out of MIDI port is stored in RAM
location DE00. The z80 machine code breaks down as follows:
3E0C Load 0C into accumulator
D3A8 Output accumulator to I/O port address A8
(This is port A of the Intel-8255 Programmable Peripheral
interface..not sure what 0C tells the PPI to do)
3E65 Load 65 into accumulator
32F67F Store accumulator (now 65) into RAM loc 7FF6
3A00DE Load the byte the user entered which is now stored at RAM
location DE00 into the accumulator.
32F57F Store accumulator into RAM location 7FF5
3E00 Load 00 into accumulator
D3A8 Output accumulator to I/O port address A8 (To PPI port A)
C9 RETURN
In Appendix F of my MSX BASIC reference manual, there is a minute
amount of information pertaining to the 8255 PPI addresses (ie 'A8'
being port A address). The PPI must use those bytes stored at 7FF5
and 7FF6 somwhow after 00 is output to the port address A8. If
I get a chance I will get a copy of the 8255 data sheet and find
out what it is all about. I used to work with them but I can't
remember ALL of the microcode! Maybe if I get really hooked on
this, I will send away for any CX5M technical info (schematics,
memory maps etc) that Yamaha may have.
-Steve Bulmer
|